mlabs-haskell / lambda-buffers

LambdaBuffers toolkit for sharing types and their semantics between different languages
https://mlabs-haskell.github.io/lambda-buffers/
Apache License 2.0
29 stars 0 forks source link

Allow empty records for JSON generation #216

Open jaredponn opened 5 months ago

jaredponn commented 5 months ago

This PR removes the restriction of generating code instances for only non empty JSON objects.

Indeed, the empty JSON object

{}

is valid JSON, so schemas like

record MyEmptyRecord = { }

derive Json MyEmptyRecord

should be valid.