#json #json-parser #samples #codegen #macro #breaking #default

json_typegen_shared

Codegen from JSON samples. Not intended to be used directly. See repository for the intended crates.

11 releases (6 breaking)

0.7.0 Sep 16, 2021
0.6.0 Mar 14, 2021
0.5.0 Dec 25, 2020
0.4.1 Sep 8, 2020
0.1.0 Apr 21, 2017

#369 in Procedural macros

Download history 539/week @ 2024-03-14 343/week @ 2024-03-21 468/week @ 2024-03-28 364/week @ 2024-04-04 338/week @ 2024-04-11 416/week @ 2024-04-18 406/week @ 2024-04-25 350/week @ 2024-05-02 355/week @ 2024-05-09 432/week @ 2024-05-16 464/week @ 2024-05-23 410/week @ 2024-05-30 455/week @ 2024-06-06 535/week @ 2024-06-13 346/week @ 2024-06-20 371/week @ 2024-06-27

1,807 downloads per month
Used in 4 crates

MIT/Apache

94KB
2.5K SLoC

json_typegen_shared

json_typegen as just a library, for use in build scripts and other crates. If you want an actual interface, like a website, CLI or procedural macro, check the repo: github.com/evestera/json_typegen

Note: This crate is to a certain extent considered internal API of the json_typegen tools. If you want to use this crate directly, be prepared for breaking changes to happen, and consider opening an issue to let me know what you are using. (Breaking changes may still happen, but then I'll at least try to keep your use-case in mind if possible. This has happened enough by now that there are parts I already consider public API.)

Crate feature flags

All of these flags are on by default, but you can avoid dependencies you don't care about disabling some or all of them, with e.g. something like this to only enable option parsing:

json_typegen_shared = { version = "*", default-features = false, features = ["option-parsing"] }

remote-samples

Required to load samples from URLs.

local-samples

Required to load samples from local paths.

option-parsing

Required to parse an options object from a string. Since this is required for code generation from macro-like strings, this is also required for the functions codegen_from_macro and codegen_from_macro_input.

Dependencies

~6–12MB
~237K SLoC