git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Randall S. Becker" <rsbecker@nexbridge.com>
To: "'Kevin Daudt'" <me@ikke.info>,
	"'Eyjolfur Eyjolfsson'" <eyjolfureyjolfsson@tprg.com>
Cc: <git@vger.kernel.org>
Subject: RE: Is it possible to convert a Json file to xml file with Git
Date: Tue, 31 Oct 2017 17:52:48 -0400	[thread overview]
Message-ID: <001801d35292$9871bd10$c9553730$@nexbridge.com> (raw)
In-Reply-To: <20171031212251.GB7777@alpha.vpn.ikke.info>

> On October 31, 2017 5:23 PM, Kevin Daudt wrote:
> > On Tue, Oct 31, 2017 at 05:28:40PM +0000, Eyjolfur Eyjolfsson wrote:
> > I have a question.
> > Is it possible to convert a Json file to XML with Git
> 
> git is a version control system, which is mostly content agnostic. It
knows
> nothing about json or xml, let alone how to convert them.
> 
> You might want to use some kind of programming language to do the
> conversion.

Speculating... one possible reason to do this is during a protocol
conversion effort, where definitions are moving from XML to JSON form. In
legacy VCS systems, keeping interface definitions in one file and converting
the content may be important. However, in git, with its concept of atomicity
(multiple files are committed in a single version across the whole
repository), dropping one file (e.g., XML) and adding another (e.g., JSON),
can be done in one commit, and never lost or confused as to what is
intended. This makes git ideal for modernization and evolutionary projects.

If, however, there is an application or systemic requirement to change the
content of a file from XML to JSON without changing the name - I've seen it
happen - you may want to consider building a smudge filter that understands
the difference and maps between the two, to allow git diff operations
between old and new formats. I would not recommend using this approach
except as a last possible resort. Make a new file as Kevin intimated.

Just Musing on the Topic,
Randall

-- Brief whoami: NonStop&UNIX developer since approximately
UNIX(421664400)/NonStop(211288444200000000)
-- In my real life, I talk too much.




  reply	other threads:[~2017-10-31 21:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-31 17:28 Is it possible to convert a Json file to xml file with Git Eyjolfur Eyjolfsson
2017-10-31 21:22 ` Kevin Daudt
2017-10-31 21:52   ` Randall S. Becker [this message]
2017-11-01 10:09     ` Eyjolfur Eyjolfsson
2017-11-01 10:25       ` Jason Pyeron

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='001801d35292$9871bd10$c9553730$@nexbridge.com' \
    --to=rsbecker@nexbridge.com \
    --cc=eyjolfureyjolfsson@tprg.com \
    --cc=git@vger.kernel.org \
    --cc=me@ikke.info \
    /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).