Skip to content

Releases: evestera/json_typegen

v0.7.0: Output imports and collect additional properties

16 Sep 16:41
Compare
Choose a tag to compare

New features

  • Output imports/use statements for Rust and Kotlin
  • Collect additional/optional properties (Rust and Kotlin/Jackson)
  • Various improvements to the web UI
  • Various changes to better support use of json_typegen_shared as a library

Fixes

  • Kotlin:
    • Don't output empty data classes for empty objects
    • Only restrict use of hard keywords (use less rename annotations)
    • Output Any? instead of Any to include null for values of unknown type
    • Use correct Kotlin type alias syntax

Breaking changes

  • Option parsing is now an optional feature.
    This is a breaking change for anyone using default-features = false and option parsing.
    Enable by adding "option-parsing" to the list of enabled features.
  • Some Kotlin fields that would previously be renamed because
    they are soft keywords are no longer renamed.

v0.6.0: New features and significantly improved web interface

14 Mar 17:07
Compare
Choose a tag to compare

New features

  • New output format: Kotlin w/ kotlinx.serialization
  • New output format: Typescript with a single nested type alias
  • New option unwrap, for "unwrapping" wrapped JSON nodes before generating types. Combined with inference hints specifying an opaque type this allows creating types for wrappers and actual content separately
  • Lots of improvements to the web interface (typegen.vestera.as)
    • Button to download output as file
    • Button to load input from file
    • Code generation moved to out of UI thread using Web Worker API. Combined with loading from file, the web interface should now be much more useable with large files. For very large files fixing #15 will still be needed.
    • Input form is now stored in localStorage
    • You can now use the mentioned unwrap option and inference hint blocks in the web interface
    • Several other general improvements...

Fixes

  • Kotlin: Cleaner output. JsonNaming was using Java syntax, should be correct now.
  • JSON Schema: Output is now targeting a specific version (draft-07)
  • Fixed a bug that caused wildcards for targeting inference hints to not be applied to arrays correctly.

0.5.0: Type generated is always root type

25 Dec 17:45
Compare
Choose a tag to compare

There will now always be a type (or type alias) generated with the requested name. This used to not always be the case. While it is an obvious choice in hindsight, making this correction is unfortunately a potentially breaking change:

Breaking changes 💥

  • Requesting the name Foo for a list of objects would previously
    use the name Foo for the type of the elements. It will now use Foo for
    the list (the root type). If the codegeneration is able to "singularize"
    the name (e.g. "Points" to "Point") the object type name will be the
    same as before ("Point") and the plural will be used for the list.

Crates:

0.4.1

08 Sep 12:48
Compare
Choose a tag to compare

Changes:

  • Only some necessary updates to dependencies.

The lack of updates to this project is partly due to the fact that I'm working on a complete rewrite to fix some of the larger issues related to how the goals of the project has changed over time. The new version is a lot better with regards to performance on large files and WASM bundle size, but there is still some work left to do before it is ready for release. 🤷‍♂️

Crates:

0.4.0

12 Nov 09:37
Compare
Choose a tag to compare

Changes:

  • Better defaults for generated code. data class for Kotlin, export interface for TS, pub struct for Rust
  • Add support for specifying JSON property name format (option property_name_format) to get nicer code with rename_all with Rust/Serde and PropertyNamingStrategy for Kotlin/Jackson. Try it out in the web interface.

As before, precompiled binaries attached below!

Crates:

0.3.3

24 Jul 16:55
Compare
Choose a tag to compare

Changes:

  • A bugfix for Typescript generation (#10)
  • There is a shiny new wasm-based web interface at typegen.vestera.as

As before, precompiled binaries attached below!

Crates:

0.3.2: Precompiled binaries

15 Feb 23:10
Compare
Choose a tag to compare

Changes:

  • Precompiled binaries! Download them below.
  • Bugfix for Kotlin generation
  • Output now includes trailing newline

Crates:

0.3.1: Rust 2018 keywords

04 Feb 23:30
Compare
Choose a tag to compare

Bugfix release. Rust code generation had to be made aware of new Rust 2018 keywords: async, await and try.

Crates:

0.3: Rust 2018 and additional formats

04 Feb 23:27
Compare
Choose a tag to compare

Highlights:

  • Additional output formats (Kotlin, Typescript, JSON Schema)
  • Rust 2018 (simpler importing and derive crate no longer necessary)

Long overdue v0.2

23 Jul 22:00
Compare
Choose a tag to compare

Long overdue release, so quite a few changes. In particular, have a look at CONFIGURATION.md.

Coming up: Multiple output formats!