Tuesday, November 24, 2020

Introducing JsonSrcGen 1.0

 

 Introducing JsonSrcGen 1.0


JsonSrcGen 1.0.3 has been released. JsonSrcGen 1.0 is a production ready stable release. 

Features

  • Compile time code generation using c# Source Generators
  • Serialization to and from strings
  • Custom serializers
  • Support for all common .net types including Lists, Arrays and Dictionarys
  • High performance in both startup and runtime

Whats Next?

JsonSrcGen 1.0 will only get bug fixes going forward. Work will start on JsonSrcGen 1.1 which will add the ability to serialise to an from utf8 data. In real world applications it is more likely that you will need to work with utf8 than with strings, so JsonSrcGen 1.1 should provide a significant boost for those use cases.

Please checkout the JsonSrcGen project on github: https://github.com/trampster/JsonSrcGen

JsonSrcGen is available as a nuget package:

Friday, November 6, 2020

JsonSrcGen 1.0.1 RC 2 Released

 

JsonSrcGen 1.0.1 RC 2 Released


JsonSrcGen 1.0.1 RC 2 has been released, This is the second release candidate leading up to the first production ready release. All going well this will be the last release candidate before the first stable release.

New Features

  • Added JsonOptionalAttribute to specify a property should be set to default if not present in the JSON during deserialisation.

Bug Fixes

  • Fixed deserialising empty objects

JsonOptionalAttribute

Added JsonOptionalAttribute to specify a property should be set to default if not present in the JSON during deserialisation. This is only necessary if you are reusing an object for multiple deserialisations.

public class MyJsonType
{
    [JsonOptional]
    string MyProperty{get;set;}
}

Real Json Testing program

If you would like to ensure your Json API works with JsonSrcGen then you can submit your tests to be included in our RealJsonTests folder via a merge request. The JsonSrcGen developers will ensure that any tests included here pass for each new release.

Tests must meet the following criteria:
  • Use nunit
  • Use local json data (no external API calls from the tests)
API's are eligible for free inclusion under any of the following conditions:
  • The API is available to the public free of charge.
  • The server or client code is available under an OSI approved opensource licence.
If your API does not meet the above conditions please contacts the maintainers to discus how you can support the development in exchange for having your tests included.

Call to testing

Please test JsonSrcGen against your Json and raise bug reports for any problem you find.

Please checkout the JsonSrcGen project on github: https://github.com/trampster/JsonSrcGen

JsonSrcGen is available as a nuget package: