Code Monkey home page Code Monkey logo

Comments (4)

eyal-lezmy avatar eyal-lezmy commented on July 16, 2024

If you want to delegate to the user the JSON parsing, add ing a JsonConverter inteface as a dependency seems to be a good idea. The counterpart is that it ask more work to your user.

But if your goal is to "simply" get rid of the GSON dependency, maybe a good thing would be to use the JSON libraries already existing into your JAVA or Kotlin standard libraries.

  • For Java there is no portable solution covering the Java JDK and Android at the same time. If you choose to support one of the platforms you can use the native JSON libraries they are embedding.
  • For Kotlin there is a serialization library that is aimed to be part of Kotlin 1.3. So far it is experimental, it is maybe not a good idea to add it to the project for now.

The advantage of using a standard lib is that nothing else is asked to the user than just working on it's own logic. It will increase a lot the on boarding of the library.

Considering Gson is not that big and many developers are already adding it to their projects, I would advise to not taking care of it as soon as kotlinx.serialization is part of the Kotlin sdt lib.

from javaphoenixclient.

dsrees avatar dsrees commented on July 16, 2024

@eyal-lezmy thanks for the input! I haven't decided the best approach here but these are some very good points. I've considered maybe breaking the project into a core and gson packages so you can decide which one you want to use.

The goal is to make as light-weight of a client as possible with as few dependencies as possible. I will probably wait until the kotlin.serialization is standardized though before moving on this.

from javaphoenixclient.

Maradox avatar Maradox commented on July 16, 2024

I would also like to swap in another JSON-library. Is this still something you are considering?

from javaphoenixclient.

dsrees avatar dsrees commented on July 16, 2024

@Maradox 0.6.0 has been released which supports a custom encode and decode functions, which matches the JS and Swift client APIs. See the README or Defaults.kt for implementation details.

GSON is still a dependency and I don't plan on changing that anytime soon so I will be closing this issue

from javaphoenixclient.

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.