Re: [go-nuts] xml to json, parsing xml

2024-04-24 Thread Peter Galbavy
I could really have used the go-xmlstruct a year ago :-) But, if I need to fill in more blanks I will try it! On Thursday 25 April 2024 at 02:24:45 UTC+1 twp...@gmail.com wrote: > You can parse XML and JSON quickly with these tools: > > https://github.com/twpayne/go-xmlstruct > https://github.co

Re: [go-nuts] xml to json, parsing xml

2024-04-24 Thread twp...@gmail.com
You can parse XML and JSON quickly with these tools: https://github.com/twpayne/go-xmlstruct https://github.com/twpayne/go-jsonstruct They generate Go code that parses all the example XML and JSON files that you throw at them. Regards, Tom On Tuesday, April 23, 2024 at 9:17:33 PM UTC+2 Don Cal

Re: [go-nuts] xml to json, parsing xml

2024-04-23 Thread Don Caldwell
Oops, I didn't look carefully at the json output of my little program. It does sometimes emit arrays. For example: go build xmlparse.go ./xmlparse -url 'https://news.google.com/atom' This produces what, for some part, represents acceptable json. The exceptions are the atom entries that would st

Re: [go-nuts] xml to json, parsing xml

2024-04-23 Thread Don Caldwell
I agree. The link that I sent demonstrates one very simple way. Mapping XML with repetitive tag sets to JSON arrays, though, would take a bit of work meaning, I think, at least two passes. D On Tue, Apr 23, 2024, 13:04 robert engels wrote: > I don’t think that is true. There are multiple ways t

Re: [go-nuts] xml to json, parsing xml

2024-04-23 Thread robert engels
I don’t think that is true. There are multiple ways to model XML into json. See this http://badgerfish.ning.com for one of them. > On Apr 23, 2024, at 11:43 AM, burak serdar wrote: > > In general, you cannot convert xml to json. They have incompatible > models. XM

[go-nuts] xml to json, parsing xml

2021-10-07 Thread RS
What is the best approach to convert xml to json? However I need above all to parse a very complex xml to see if related properties are existing. I thought maybe converting it to Json maybe make it easier. -- You received this message because you are subscribed to the Google Groups "golang-