google / fhir

FHIR Protocol Buffers
Apache License 2.0
828 stars 189 forks source link

Feature Request: Friendlier extension JSON for non-standard JSON consumers #13

Open sttawm opened 4 years ago

sttawm commented 4 years ago

Currently, this project's JSON printer produces complex and deeply nested json for extensions (as per the standard). It would be nice if the printer produced a simpler JSON, for i.e. clients that were willing to accept non-standard FHIR.

One could imagine running the standard protobuf json printer to simplify printing of extensions, but then again the overall JSON becomes more complex (with lots of nested "value").

nikklassen commented 4 years ago

Have you taken a look at the output when using the analytic schema (kFormatAnalytic in the C++ parser)? It is designed to promote Extensions to first class values, and limit recursive depth.