* Move UDLs into nlohmann::literals::json_literals namespace
* Add 'using namespace' to unit tests
* Add 'using namespace' to examples
* Add 'using namespace' to README
* Move UDL mkdocs pages out of basic_json/
* Update documentation
* Update docset index
* Add JSON_GlobalUDLs CMake option
* Add unit test
* Build examples without global UDLs
* Add CI target
* Make certain usage patterns more prominent in the README
We use this library extensively where I work. After pairing with many
teammates, I've learned that one common stumbling point when using this
library is how to first get a JSON value in the first place (because
once they have a variable of type `json` in hand, the API is intuitive
and mostly does what you expect).
With that in mind, I've added two subsections to the top of the Examples
section: how to read JSON from a file, and how to hardcode a JSON
literal.
I understand that these are already documented elsewhere in the Examples
section, and so these new subsections are technically redundant. But to
defend this choice:
- Redundancy in docs is actually good, because not everyone consumes
docs in the same way or in the same order.
- Having these things called out explicitly in isolation encourages
people to get something working faster. In later sections, these
examples are presented alongside many other options. Having to choose
between alternatives gets in the way of quickly prototyping something.
If you have further suggestions for how to improve or modify these docs
I'm open to them. The changes included here would really make a huge
improvement in the productivity of newer members of my team using this
library.
* Remove old TOC entry
* Put the section back
* Another tweak
* ⬆️ Doctest 2.4.7
* 👷 add CI step for ICPC
* 👷 add CI step for ICPC
* 👷 add CI step for ICPC
* ⬇️ downgrade to Doctest 2.4.6
* 👷 add CI step for ICPC
* 👷 add CI step for ICPC
* 👷 add CI step for ICPC
* 👷 add CI step for ICPC
* 👷 add CI step for ICPC
* 🔇 suppress warning #2196: routine is both "inline" and "noinline"
* Re-enable <filesystem> detection on ICPC
* Limit regression test for #3070 to Clang and GCC >=8.4
* Disable deprecation warnings on ICPC
* Disable regression test for #1647 on ICPC (C++20)
* Fix compilation failure of regression test for #3077 on ICPC
* Disable wstring unit test on ICPC
Fixes:
error 913: invalid multibyte character sequence
* Add ICPC to README
Co-authored-by: Niels Lohmann <mail@nlohmann.me>
* support UBJSON-derived Binary JData (BJData) format
* fix Codacy warning
* partially fix VS compilation errors
* fix additional VS errors
* fix more VS compilation errors
* fix additional warnings and errors for clang and msvc
* add more tests to cover the new bjdata types
* add tests for optimized ndarray, improve coverage, fix clang/gcc warnings
* gcc warn useless conversion but msvc gives an error
* fix ci_test errors
* complete test coverage, fix ci_test errors
* add half precision error test
* fix No newline at end of file error by clang
* simplify endian condition, format unit-bjdata
* remove broken test due to alloc limit
* full coverage, I hope
* move bjdata new markers from default to the same level as ubjson markers
* fix ci errors, add tests for new bjdata switch structure
* make is_bjdata const after using initializer list
* remove the unwanted assert
* move is_bjdata to an optional param to write_ubjson
* pass use_bjdata via output adapter
* revert order to avoid msvc 2015 unreferenced formal param error
* update BJData Spect V1 Draft-2 URL after spec release
* amalgamate code
* code polishing following @gregmarr's feedback
* make use_bjdata a non-default parameter
* fix ci error, remove unwanted param comment
* encode and decode bjdata ndarray in jdata annotations, enable roundtrip tests
* partially fix ci errors, add tests to improve coverage
* polish patch to remove ci errors
* fix a ndarray dim vector condition
* fix clang tidy error
* add sax test cases for ndarray
* add additional sax event tests
* adjust sax event numbering
* fix sax tests
* ndarray can only be used with array containers, discard if used in object
* complete test coverage
* disable [{SHTFNZ in optimized type due to security risks in #2793 and hampered readability
* fix ci error
* move OutputIsLittleEndian from tparam to param to replace use_bjdata
* fix ci clang gcc error
* fix ci static analysis error
* update json_test_data to 3.1.0, enable file-based bjdata unit tests
* fix stack overflow error on msvc 2019 and 2022
* use https link, update sax_parse_error after rebase
* make input_format const and use initializer
* return bool for write_bjdata_ndarray
* test write_bjdata_ndarray return value as boolean
* fix ci error
* ⬆️ use new CI image
* ⬆️ use new CI image
* 🚨 suppress Clang-Tidy warnings
* 💚 use proper scan-build version
* 🚨 suppress Clang-Tidy warnings
* ⬆️ use more recent GitHub actions
* 💚 add missing compiler
* 📝 update used compilers
* 🚨 fix duplicate inclusion
I've submitted a PR on [homebrew/core](https://github.com/Homebrew/homebrew-core/pull/83479) that updates their Formula. After that one is set, we can merge this and let users use the default formula, and we don't have to maintain two separate Formulas.