Re: [go-nuts] Re: marshal multiple json documents which may have different format versions into the latest struct version

2020-05-01 Thread Tom Payne
Possibly also useful if you're dealing with JSON documents with different structures: https://github.com/twpayne/go-jsonstruct This will generate the most specific Go struct possible that covers all the example documents that you give it. In your example it will generate: package main type T

Re: [go-nuts] Re: marshal multiple json documents which may have different format versions into the latest struct version

2020-04-29 Thread Chris Burkert
That sounds like a good plan. I'm going to try that. Thank you Manlio! Am Di., 28. Apr. 2020 um 15:11 Uhr schrieb Manlio Perillo < manlio.peri...@gmail.com>: > On Tuesday, April 28, 2020 at 10:52:56 AM UTC+2, Chris Burkert wrote: >> >> Dear all, >> >> my application users shall be able to

[go-nuts] Re: marshal multiple json documents which may have different format versions into the latest struct version

2020-04-28 Thread Manlio Perillo
On Tuesday, April 28, 2020 at 10:52:56 AM UTC+2, Chris Burkert wrote: > > Dear all, > > my application users shall be able to provide multiple json documents > (files and urls) which I'd like to marshall into one structure. > Additionally these json documents may have different versions. I know