git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Alexander Mills <alexander.d.mills@gmail.com>
To: git@vger.kernel.org
Subject: Re: Support JSON with --json flag and provide header files
Date: Mon, 6 Aug 2018 21:57:46 -0700	[thread overview]
Message-ID: <CA+KyZp6qDJqPky+rg-6kKDJ3yGSTeOroAddC4k0X=Sczz9VyYw@mail.gmail.com> (raw)
In-Reply-To: <CA+KyZp5i8KzaAnet1eQovkxS2wLHUfnhZT04GCm2eXSFBqO+Fg@mail.gmail.com>

To make it clear, these headers files would allow for compile-time type safety.
When you are parsing serialized data into a data structure, you know
have header files that describe the data type(s).
It would be nice to not have to "guess" about the structure of the
JSON that git produces.

On Mon, Aug 6, 2018 at 9:54 PM, Alexander Mills
<alexander.d.mills@gmail.com> wrote:
> @git
>
> I hear there is a movement underway to have git support JSON for the
> purposes of machine readable stdio.
>
> That is all good and well. I want to add to that request. Imagine a
> software world were serialized data could be typed. So JSON produced
> by C/C++ could be described and the receiving process could have type
> information about how the JSON would be deserialized.
>
> How would that work? For every typed language, Git would provide
> header files for that language that include type information for each
> JSON string that would be produced by git commands.
>
> How could that be accomplished? Someone needs to create a system to
> generate type information (header files) for each language based off a
> single central format. So we create a JSON format that describes the
> JSON data. And from that single format we generate header files for
> each typed language.
>
> I hope you see the value in that. There could be a git command that
> generates the header files for a given language, given the git
> version:
>
> $ git --generate-header-files --language=java > $dir
>
> the above command would generate the right header files for Java given
> the git version. Or the headers could be stored on the www and could
> be downloadable for each git version. Perhaps Git authors wouldn't do
> all this work - perhaps they just author a JSON format that describes
> JSON. And the OSS community can write tools that convert the JSON
> format into header files for each language. But I would like something
> OFFICIAL to take place here.
>
> Hope this makes sense. I am looking forward to a software future where
> parsing stdio is easier by using machine readable JSON. Want human
> readable output? Use the regular command. Want machine readable
> output? use the --json flag.
>
> -alex
>
> --
> Alexander D. Mills
> ¡¡¡ New cell phone number: (415)730-1805 !!!
> alexander.d.mills@gmail.com
>
> www.linkedin.com/pub/alexander-mills/b/7a5/418/



-- 
Alexander D. Mills
¡¡¡ New cell phone number: (415)730-1805 !!!
alexander.d.mills@gmail.com

www.linkedin.com/pub/alexander-mills/b/7a5/418/

      reply	other threads:[~2018-08-07  4:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-07  4:54 Support JSON with --json flag and provide header files Alexander Mills
2018-08-07  4:57 ` Alexander Mills [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+KyZp6qDJqPky+rg-6kKDJ3yGSTeOroAddC4k0X=Sczz9VyYw@mail.gmail.com' \
    --to=alexander.d.mills@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).