git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC/PATCH 0/3] JSON/XML output for scripting interface

From
Julian Phillips <julian@quantumfyre.co.uk>
Date
Apr 11, 2010, 23:30 UTC
Message-ID
<61c2a556d3b557df82cc5da764b5d0f2@212.159.54.234>
In-Reply-To
<776480BE-3652-489A-96C9-9312321E49C0@gmail.com>

On Mon, 12 Apr 2010 09:25:04 +1000, Jon Seymour <jon.seymour@gmail.com> wrote:

Show 15 quoted lines
> On 12/04/2010, at 8:22, Jon Seymour <jon.seymour@gmail.com> wrote:
>>
>> 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.

I have to admit that most of the names were just "first idea out of the hat" - not really something I was paying too much attention to. It's fairly easy to tweak them later, provided it's done before they get published.

Having said that, I've just mailed out v2 patches, which already include line-based output (using a different approach). ;)

More descriptive names are probably something that should be done anyway though.

-- 
Julian
Previous: Jon Seymour
Message 24 of 24 in “JSON/XML output for scripting interface”
  1. 0/3 JSON/XML output for scripting interfaceJulian Phillips, Apr 11, 2010
  2. 1/3 strbuf: Add strbuf_vaddf functionJulian Phillips, Apr 11, 2010
  3. Erik Faye-LundApr 11, 2010
  4. Julian PhillipsApr 11, 2010
  5. 2/3 add a library of code for producing structured outputJulian Phillips, Apr 11, 2010
  6. Erik Faye-LundApr 11, 2010
  7. Julian PhillipsApr 11, 2010
  8. Jakub NarebskiApr 11, 2010
  9. Junio C HamanoApr 11, 2010
  10. Sverre RabbelierApr 11, 2010
  11. Julian PhillipsApr 11, 2010
  12. Jakub NarebskiApr 11, 2010
  13. Julian PhillipsApr 11, 2010
  14. Eric RaymondApr 11, 2010
  15. 3/3 status: add support for structured outputJulian Phillips, Apr 11, 2010
  16. Sverre RabbelierApr 11, 2010
  17. Julian PhillipsApr 11, 2010
  18. Sverre RabbelierApr 11, 2010
  19. Julian PhillipsApr 11, 2010
  20. Sverre RabbelierApr 11, 2010
  21. Jon SeymourApr 11, 2010
  22. Eric RaymondApr 11, 2010
  23. Jon SeymourApr 11, 2010
  24. Julian PhillipsApr 11, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.