Skip to content

Wraps the standard JSON library to marshal/unmarshal arbitrary struct fields

License

Notifications You must be signed in to change notification settings

PennState/additional-properties

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

additional-properties

Generates MarshalJSON and UnmarshalJSON methods to allow arbitrary fields when marshaling and unmarshaling structs. See the official JSON Schema definition of additional properties at https://json-schema.org/understanding-json-schema/reference/object.html

This attempts to fix a problem with encoding/json where there's no way to retrieve arbitrary fields when unmarshaling to a struct as described in golang/go#6213.