Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use json.RawMessage when polymorphic fields contain submessages (#88)
* Use json.RawMessage when polymorphic fields contain submessages So far, these fields were represented as `interface{}`, which means that the JSON library parsed these fields. However, they contain opaque data, which makes it very inconvenient to work with such a message. Now, fields with a submessage are represented as json.RawMessage, so that applications can re-parse these submessages into the correct structure more easily. If the list of types only contains fundamental types, we stick with `interface{}`. Signed-off-by: Cornelius Weig <22861411+corneliusweig@users.noreply.github.com> * Address review comments Signed-off-by: Cornelius Weig <22861411+corneliusweig@users.noreply.github.com> --------- Signed-off-by: Cornelius Weig <22861411+corneliusweig@users.noreply.github.com>
- Loading branch information