Comments (4)
I tried to reproduce the error and it is showing a good exception actually.
from json.
@marfixdev Can I close this issue?
from json.
json::insert()
only operates on arrays, not objects in the form you used. (Form (1) at the API documentation.). Only Form (5) of insert()
is for inserting into objects.
You should be using json::update()
.
from json.
The type_error exception should provide more information in the what
string. If you print it, it should probably indicate what @nomadwolf0 wrote.
from json.
Related Issues (20)
- Initializing `json` by direct initialization and copy initialization invokes different constructors HOT 2
- why a single-object json file appears in an array HOT 2
- In highly nested functions, passing json into a function leads to a segmentation fault/bus error HOT 15
- Exception SIGSEGV - Segmentation violation signal on file parsing (v3.11.2, linux, doctest) HOT 5
- use of overloaded operator '<=>' is ambiguous HOT 9
- README.md overuses `template` keyword before `get` function HOT 2
- Parser and constructor resolve integer types differently HOT 3
- Exception thrown when dumping utf-8 characters when using std::string HOT 2
- 3.11.3: test suite fails in 4 units HOT 8
- Deprecation warning on save action in check-amalgamation CI step HOT 1
- Build failure on macOS Sonoma 14.1.1 HOT 4
- very accidental: SIGABRT when parsing json string with allow_exceptions=false HOT 7
- `to_json` is erroneously converting enums with underlying unsigned types to signed numbers
- Issue with including <version> HOT 2
- stack overflow while fuzzing parse-cbor-fuzzer HOT 3
- NLOHMANN_JSON_FROM* macros not comptaible with non-default-constructible types HOT 6
- Parsing simple zeroes throws type exception HOT 1
- Newer serialization macros not listed in README
- Cannot use std::format on nholman::json objects HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from json.