Re: [RFC/PATCH 0/3] JSON/XML output for scripting interface
- From
Jon Seymour <jon.seymour@gmail.com>
- Date
- Apr 11, 2010, 23:25 UTC
- Message-ID
- <776480BE-3652-489A-96C9-9312321E49C0@gmail.com>
- In-Reply-To
- <q2i2cfc40321004111522kd177fb89k6b9265c641d7deec@mail.gmail.com>
On 12/04/2010, at 8:22, Jon Seymour <jon.seymour@gmail.com> wrote:
Show 5 quoted lines
> > So, would it be worth providing a hint as to record type in the > output_start_object call so that if it was later desired to subsume > line-oriented formats under the same framework, there is enough > information available to the backend to do that?
Of course, one way to do this would be to use a more descriptive record name than "entry". This would make the record itself (as opposed to just it's fields) self-describing.
The point is, you would want to start using descriptive record names now so that you don't end up locked into a partially context sensitive base of consumers who are expecting their JSON records to be called "entry" and using context hints to infer the actual record type.
jon.