Code Monkey home page Code Monkey logo

Comments (3)

cowtowncoder avatar cowtowncoder commented on June 13, 2024 1

Thank you for reporting this. Broken output is wrong, regardless, so I hope this is something that can just be fixed. I am not against option(s) that allow choosing simple toString() to be used, if a good API approach can be found (that is, simple, consistent with existing config options, intuitive).

from jackson-dataformats-text.

cowtowncoder avatar cowtowncoder commented on June 13, 2024 1

Ok. So the technical challenge is that END_OBJECT for nested object is assumed to be the end of outermost object, which should trigger end-of-line. In this case this is false assumption, due to nesting.
I will have to think about how to handle this more reliably, first, to get rid of the false linefeed.

Second problem, then, is whether there might be better handling here for nested POJOs: as things are, arrays can be handled by using array separator. But it is not clear what should be done for contents.
I think use of @JsonValue for Person might work here, I'll check that to make sure.

from jackson-dataformats-text.

cowtowncoder avatar cowtowncoder commented on June 13, 2024 1

Yes; use of @JsonValue does work, for serialization, and in this particular case actually even prevents the linefeed (because no START_OBJECT/END_OBJECT writes are done, given that value becomes just a String).

@pimuzzo You may see if @JsonValue on Person might work for you. I will try to resolve the output problem wrt linefeed.

from jackson-dataformats-text.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.