Code Monkey home page Code Monkey logo

Comments (11)

mockitoguy avatar mockitoguy commented on May 19, 2024

I removed the please contribute label for now if that's ok =). I completely agree that the feature needs to be implemented, though! I penned down the criteria for "please contribute!" label in the README.md.

from shipkit.

NagRock avatar NagRock commented on May 19, 2024

Don't you think that Serializer class should not write serialized data to file? In my opinion Serializer class should only return JSONString and some FileWriter could be used to store serialized data into file.
Why? Because now we can't reuse AllContributorsSerializer to implement ReleaseNotesSerializer as ContributionSet is part of ReleaseNotesData.

from shipkit.

NagRock avatar NagRock commented on May 19, 2024

@szczepiq it's not done yet. I just made a little part. Think that You should reopen it and I can finish this task completely. Just want to know if this is good way before doing all things.

from shipkit.

NagRock avatar NagRock commented on May 19, 2024

Hi again, I want to ask if there is any reason why we using JSON simple library instead of Jackson or something else?
We got to manually format object to strings with this lib, and deserialization of complex structures with collections is getting really complicated.

from shipkit.

mockitoguy avatar mockitoguy commented on May 19, 2024

Hey! Nice catch! Please suggest an alternative library. You can kick off the discussion here, on our slack or on the mailing list.

One of our goals is to keep the dependencies of library as narrow and as simple as possible to avoid pushing down version conflicts onto our clients (e.g. the cost of reuse...). I suspect that we didn't choose some other library for those reasons :)

from shipkit.

NagRock avatar NagRock commented on May 19, 2024

I think that Jacskon is a really good option. We can use ObjectMapper to convert to JSON and back to Java object with given class:

User user = new User();

//Object to JSON in file
mapper.writeValue(new File("c:\\user.json"), user);

And back to Java object:

String jsonInString = "{'name' : 'mkyong'}";

//JSON from file to Object
User user = mapper.readValue(new File("c:\\user.json"), User.class);

Without any casting as in simple JSON or reading field by field. Simple JSON returns JsonObject, JsonArray etc. instead of typed object and we got to do many things manually. I think its good lib for small project when we want to read one json file.

from shipkit.

mstachniuk avatar mstachniuk commented on May 19, 2024

Dependencies of Jackson:

+--- com.fasterxml.jackson.core:jackson-databind:2.8.8.1
|    +--- com.fasterxml.jackson.core:jackson-annotations:2.8.0
|    \--- com.fasterxml.jackson.core:jackson-core:2.8.8

Dependencies of json-simple:

+--- com.github.cliftonlabs:json-simple:2.1.2

I don't have strong preferences but with Jackson the life is simpler :) We need only remember to use 2.6.6 (05-Apr-2016) version for Java 1.6 compatibility: https://github.com/FasterXML/jackson-databind/blob/master/release-notes/VERSION

from shipkit.

NagRock avatar NagRock commented on May 19, 2024

@szczepiq whats your opinion? Should I move to Jackson within this issue and replace Simple Json in app?

from shipkit.

wwilk avatar wwilk commented on May 19, 2024

We had this discussion about a month ago, and decided against any reflection-based library. One reason is that most of them are much heavier, not only due to transitive dependencies but also the size of libraries themselves (jackson-databind 1.2 MB vs json-simple 17 KB). I'm not sure if that will matter in the long run, but for now we don't have much dependencies and it would be good to keep it that way. Additionally @NagRock serialization/deserialization with jackson is not that straightforward if we want to serialize to file and then deserialize, like with release notes. Since the model is mostly based on interfaces we would have to use some kind of jackson inheritance to implement it.

from shipkit.

NagRock avatar NagRock commented on May 19, 2024

So you suggest to continue working on this with json simple? Im ok with that but it is a little bit tedious work.

from shipkit.

NagRock avatar NagRock commented on May 19, 2024

Ok, now it can be closed.

from shipkit.

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.