Is there a source generator that generates poco classes from a JSON schema?

This page summarizes the projects mentioned and recommended in the original post on /r/csharp

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • Textrude

    Code generation from YAML/JSON/CSV models via SCRIBAN templates

  • Fair point - source generators can run arbitrary code so yes, they can read a json file and then spit out something else in response. If you want to translate the json schema into the equivalent C# you'll need to write a small amount of code to deserialize the json into a JObject tree, walk it, and emit c# code. I do something similar in my Textrude code-generation/templating project except I'm translating the tree into an equivalent Scriban object tree. The relevant source code is here. All that said, this is a fairly specialised and common task - I can't believe there's not a command line tool to do this already.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts