Online json.Marshal as opposed to json-to-go
Please click the link to the right and paste your struct definitions.
Yes.
People asked the same question here and here.
This repo was born out of a request by one of my colleagues: how to marshal Go structs to corresponding JSON data, as with:
import "encoding/json"
output, err := json.Marshal(v)...but online. You don't have to involve the Go compiler to get the result.
So the first version was implemented in Haskell as a command-line tool. Later, I added an HTTP API, read some Elm tutorials, and then wrote a web UI for it. It met my expectations.
However, I didn't stop there. I rewrote everything in pure Elm to take advantage of Github Pages. I strive to keep it as close to the one-true implementation as possible, but it will be opinionated in some corner cases.
Feel free to try it out.
Overall, this tool is a hobbyist's creation. I have been working on it since 2020, and I hope it reaches a wider audience and helps those in need.
| Branch | Language |
|---|---|
| archive | Haskell (back) + Elm (front) |
| main | pure Elm |
| ghcjs | 98% Haskell (w./ GHC 9.8.1 JavaScript Backend) + 1% HTML + 1% JS shim |
Issues or PRs welcome.