Hi Tatu, thanks for answering. I'm not the guy who posted the question in stackoverflow.
I'm using Jackson through Spring, so i'm using the Spring Jackson converter. At the moment I'm debugging Spring because is not working as expected using this converter. Apologies if my question annoyed you, have a better day since now. On 7 May 2018 at 20:59, Tatu Saloranta <[email protected]> wrote: > And specifically, since that question was not even Jackson specific > (... that question really is not same at all, it used org.json > package), > things work exactly as they should: > > String json = new ObjectMapper().writeValueAsString(myLinkedHashMap); > > Did you actually try this before asking the question? > > -+ Tatu +- > > > > On Mon, May 7, 2018 at 11:34 AM, Tatu Saloranta <[email protected]> > wrote: > > It works just fine, after removing weird usage of `JSONObject`. I have > > no idea why that was there, but it does bother me that people cut'n > > paste code they do not understand > > and then blame library & ask author why is library broken. > > Like in this particular case. > > > > I don't exactly enjoy doing your homework for you but here we are. > > > > -+ Tatu +- > > > > > > On Mon, May 7, 2018 at 1:46 AM, David Canos <[email protected]> > wrote: > >> I'm trying to build a json from a LinkedhHashMap, order of keys are > >> important so I need to preserve the insertion order (natural order). > >> My keys are integers and I always get a json result in an ASC order > besides > >> the insertion order. > >> > >> Another similar here: > >> https://stackoverflow.com/questions/29491281/building- > ordered-json-string-from-linkedhashmap?utm_medium= > organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa > >> > >> There's a chance for this using Jackson? > >> I know Gson permit it. > >> > >> Thanks > >> > >> -- > >> You received this message because you are subscribed to the Google > Groups > >> "jackson-user" group. > >> To unsubscribe from this group and stop receiving emails from it, send > an > >> email to [email protected]. > >> To post to this group, send email to [email protected]. > >> For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to the Google Groups > "jackson-user" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- David Canós www.notikumi.com Síguenos en Twitter: @notikumi <https://twitter.com/intent/follow?original_referer=http%3A%2F%2Fwww.notikumi.com%2F®ion=follow_link&screen_name=notikumi&source=followbutton&variant=2.0> -- You received this message because you are subscribed to the Google Groups "jackson-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. For more options, visit https://groups.google.com/d/optout.
