Skip to content

Commit 4af169b

Browse files
committed
Split up glaze/json/generic.hpp
1 parent b919ec6 commit 4af169b

3 files changed

Lines changed: 634 additions & 602 deletions

File tree

docs/generic-json.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,12 @@ auto names_array = glz::get<std::array<std::string, 3>>(json, "/names");
303303
304304
This works because `glz::generic` stores arrays as `std::vector<glz::generic>` and objects as `glz::ordered_small_map<glz::generic>`. When you request a specific container type, Glaze deserializes the generic representation into your desired type.
305305
306+
## Compilation time optimization
307+
308+
`glaze/json/generic.hpp` header is a quite heavyweight as it also pulls the entire JSON library.
309+
310+
If you want to use `glz::generic` as part of some public interface, it's advisable to include `glaze/json/generic_def.hpp` instead.
311+
306312
## See Also
307313
308314
- [Lazy JSON](./lazy-json.md) - On-demand parsing for selective field access (faster for extracting few fields)

0 commit comments

Comments
 (0)