* Is it possible to convert a Json file to xml file with Git @ 2017-10-31 17:28 Eyjolfur Eyjolfsson 2017-10-31 21:22 ` Kevin Daudt 0 siblings, 1 reply; 5+ messages in thread From: Eyjolfur Eyjolfsson @ 2017-10-31 17:28 UTC (permalink / raw) To: git Hi I have a question. Is it possible to convert a Json file to XML with Git Best regards Eyjolfur Eyjolfsson (e) eyjolfureyjolfsson@tprg.com (w) tpretailgroup.com -- This email and any files transmitted with it are confidential and intended for the sole use of the individual or entity to whom they are addressed. Any unauthorised dissemination or copying of this email or its attachments or disclosure of any information contained in them is strictly prohibited. If you have received the email in error, please notify the sender by email immediately and delete it from your system. The content of the email does not necessarily represent Theo Paphitis Retail Group and associated companies and any views or opinions presented are solely those of the author. Whilst we check communications we send for virus infection, you should check this email and any attachments to it for viruses as we accept no responsibility for any loss or damage caused by any virus transmitted by this email. Email transmission cannot be guaranteed secure or error-free. Theo Paphitis Retail Group is the collective name for Ryman Group Limited, registered in England and Wales, Company Number 02714395, VAT Number 672523729, Registered Office: Ryman House, Savoy Road, Crewe, Cheshire, CW1 6NA; Ryman Limited, registered in England and Wales, Company Number 3007166, VAT Number 672523729, Registered Office: Ryman House, Savoy Road, Crewe, Cheshire, CW1 6NA; Robert Dyas Holdings Limited, registered in England and Wales, Company Number 4041884; VAT number 742720153, Registered Office: 1 St George’s Road, Wimbledon, London, SW19 4DR; Boux Avenue Limited, registered in England and Wales, Company Number 7191520, VAT Number 125504638, Registered Office: 1 St George’s Road, Wimbledon, London, SW19 4DR; Boux Avenue International Limited, registered in England and Wales, Company Number 8047333, VAT Number 125504638, Registered office: 1 St George’s Road, Wimbledon, London, SW19 4DR; and London Graphic Centre Limited, registered in England and Wales, Company Number 6062021, VAT Number 251820524, Registered Office: Ryman House, Savoy Road, Crewe, Cheshire, CW1 6NA. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Is it possible to convert a Json file to xml file with Git 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 0 siblings, 1 reply; 5+ messages in thread From: Kevin Daudt @ 2017-10-31 21:22 UTC (permalink / raw) To: Eyjolfur Eyjolfsson; +Cc: git On Tue, Oct 31, 2017 at 05:28:40PM +0000, Eyjolfur Eyjolfsson wrote: > Hi > > I have a question. > Is it possible to convert a Json file to XML with Git > > Best regards > > Eyjolfur Eyjolfsson > > (e) eyjolfureyjolfsson@tprg.com > (w) tpretailgroup.com > Hello Eyjolfur, 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. Could you perhaps explain more why you are asking this question? Kevin. ^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: Is it possible to convert a Json file to xml file with Git 2017-10-31 21:22 ` Kevin Daudt @ 2017-10-31 21:52 ` Randall S. Becker 2017-11-01 10:09 ` Eyjolfur Eyjolfsson 0 siblings, 1 reply; 5+ messages in thread From: Randall S. Becker @ 2017-10-31 21:52 UTC (permalink / raw) To: 'Kevin Daudt', 'Eyjolfur Eyjolfsson'; +Cc: git > 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. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Is it possible to convert a Json file to xml file with Git 2017-10-31 21:52 ` Randall S. Becker @ 2017-11-01 10:09 ` Eyjolfur Eyjolfsson 2017-11-01 10:25 ` Jason Pyeron 0 siblings, 1 reply; 5+ messages in thread From: Eyjolfur Eyjolfsson @ 2017-11-01 10:09 UTC (permalink / raw) To: Randall S. Becker; +Cc: Kevin Daudt, git Hi Thank you for your response and help. I am new to Git. The reason for my question is that I am using Git or Bash.exe (cURl) to call a REST web service (open for test) and retrieving Json from the web service and storing it into file. This works fine from the Git Bash command line . My Git Command: $ curl https://jsonplaceholder.typicode.com/posts -o c:\temper.txt I will look into the smudge filter. One more question is there a possibility to call Git Bash with a parameter like example C:\Git\Git\git-bash.exe curl https://jsonplaceholder.typicode.com/posts -o c:\temper.txt The reason I am asking this is that I am using NAV 2009 Classic Client and want to lunch the Git Bash with the command $ curl https://jsonplaceholder.typicode.com/posts -o c:\temper.txt Best regards (e) eyjolfureyjolfsson@tprg.com (w) tpretailgroup.com On 31 October 2017 at 21:52, Randall S. Becker <rsbecker@nexbridge.com> wrote: >> 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. > > > -- Eyjolfur Eyjolfsson (e) eyjolfureyjolfsson@tprg.com (w) tpretailgroup.com -- This email and any files transmitted with it are confidential and intended for the sole use of the individual or entity to whom they are addressed. Any unauthorised dissemination or copying of this email or its attachments or disclosure of any information contained in them is strictly prohibited. If you have received the email in error, please notify the sender by email immediately and delete it from your system. The content of the email does not necessarily represent Theo Paphitis Retail Group and associated companies and any views or opinions presented are solely those of the author. Whilst we check communications we send for virus infection, you should check this email and any attachments to it for viruses as we accept no responsibility for any loss or damage caused by any virus transmitted by this email. Email transmission cannot be guaranteed secure or error-free. Theo Paphitis Retail Group is the collective name for Ryman Group Limited, registered in England and Wales, Company Number 02714395, VAT Number 672523729, Registered Office: Ryman House, Savoy Road, Crewe, Cheshire, CW1 6NA; Ryman Limited, registered in England and Wales, Company Number 3007166, VAT Number 672523729, Registered Office: Ryman House, Savoy Road, Crewe, Cheshire, CW1 6NA; Robert Dyas Holdings Limited, registered in England and Wales, Company Number 4041884; VAT number 742720153, Registered Office: 1 St George’s Road, Wimbledon, London, SW19 4DR; Boux Avenue Limited, registered in England and Wales, Company Number 7191520, VAT Number 125504638, Registered Office: 1 St George’s Road, Wimbledon, London, SW19 4DR; Boux Avenue International Limited, registered in England and Wales, Company Number 8047333, VAT Number 125504638, Registered office: 1 St George’s Road, Wimbledon, London, SW19 4DR; and London Graphic Centre Limited, registered in England and Wales, Company Number 6062021, VAT Number 251820524, Registered Office: Ryman House, Savoy Road, Crewe, Cheshire, CW1 6NA. ^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: Is it possible to convert a Json file to xml file with Git 2017-11-01 10:09 ` Eyjolfur Eyjolfsson @ 2017-11-01 10:25 ` Jason Pyeron 0 siblings, 0 replies; 5+ messages in thread From: Jason Pyeron @ 2017-11-01 10:25 UTC (permalink / raw) To: 'Eyjolfur Eyjolfsson', 'Randall S. Becker' Cc: 'Kevin Daudt', git > -----Original Message----- > From: Eyjolfur Eyjolfsson > Sent: Wednesday, November 1, 2017 6:10 AM > To: Randall S. Becker > Cc: Kevin Daudt; git@vger.kernel.org > Subject: Re: Is it possible to convert a Json file to xml > file with Git > > Hi > > Thank you for your response and help. I am new to Git. Not a problem, but what you describe is not using git but rather a shell called bash. Bash is like cmd.exe or powershell.exe, it is not GIT. See http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html > The reason for my question is that I am using Git or Bash.exe (cURl) > to call a REST web service (open for test) and retrieving Json > from the web service and storing it into file. > This works fine from the Git Bash command line . My Git Command: Not a git command, that is a curl command. See https://curl.haxx.se/ > $ curl https://jsonplaceholder.typicode.com/posts -o c:\temper.txt > > I will look into the smudge filter. > You could search for "convert json to xml in LANGUAGE" where language is one you are familiar with. E.g. http://google.com/search?q=convert+json+to+xml+Java > One more question is there a possibility to call Git Bash with a > parameter like example > C:\Git\Git\git-bash.exe curl > https://jsonplaceholder.typicode.com/posts -o c:\temper.txt > > The reason I am asking this is that I am using NAV 2009 Classic Client > and want to lunch the Git Bash with > the command $ curl > https://jsonplaceholder.typicode.com/posts -o c:\temper.txt Again you are using Bash that came with a windows build of Git, just like when the Visual Studio shell gets installed. A place like https://stackoverflow.com/ may be a better resource than this mailing list about GIT. v/r, Jason Pyeron PS: Please do not top post. See http://www.idallen.com/topposting.html > > > Best regards > > (e) eyjolfureyjolfsson@tprg.com > (w) tpretailgroup.com > > > On 31 October 2017 at 21:52, Randall S. Becker > <rsbecker@nexbridge.com> wrote: > >> 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. <snip/> -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - - - Jason Pyeron PD Inc. http://www.pdinc.us - - Principal Consultant 10 West 24th Street #100 - - +1 (443) 269-1555 x333 Baltimore, Maryland 21218 - - - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-11-01 10:26 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 2017-11-01 10:09 ` Eyjolfur Eyjolfsson 2017-11-01 10:25 ` Jason Pyeron
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox