how to efficiently create structs to match the json response

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

SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
surveyjs.io
featured
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.
www.influxdata.com
featured
  • JSON-to-Go

    Translates JSON into a Go type in your browser instantly (original)

  • But given we know ChatGPT can't accurately generate structs from even moderately complex json objects why bother doing all of that legwork of verifying and chiding chatgpt, when you can just drop it into a tool like https://mholt.github.io/json-to-go/ and get a correct struct in a fraction of the time?

  • quicktype

    Generate types and converters from JSON, Schema, and GraphQL

  • I usually use https://app.quicktype.io/ , they also have a VSCode plugin and then fieldaligment to make sure it's as compact as possible.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • oapi-validator-echo-sample

    This is a sample project showcasing how to use oapi-codegen to generate an Echo server and then use the validator framework to validate the spec.

  • This package gives a decent overview in using said tools.

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

  • Thoughts on HTTP and JSON with Golang. And other Headaches.

    3 projects | /r/golang | 5 Jul 2022
  • Complex JSON structures - specifically ECE

    3 projects | /r/golang | 10 May 2022
  • JSON to Go Struct Converter

    1 project | /r/golang | 8 Jul 2023
  • Need a pointer on how I can unmarshal this json

    1 project | /r/golang | 24 May 2023
  • Ask HN: What are some Golang tools you can't live without?

    2 projects | news.ycombinator.com | 23 May 2023