Comments (4)
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.
@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.
I would also like to swap in another JSON-library. Is this still something you are considering?
from javaphoenixclient.
@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)
- NPE in trigger() HOT 4
- Question about the heartbeat HOT 6
- Websocket is automatically reconnected event when intentionally closed HOT 2
- Leaking bindings when the channel reply times out? HOT 3
- Lots of Timers created HOT 2
- ReconnectAfterMs is too big HOT 1
- Downgrade OKhttp to 3.12.2 HOT 1
- Heartbeat seems to be sent only once (instead of every x seconds) HOT 2
- Reconnection strategy documentation HOT 8
- Decoding message payloads HOT 2
- ConcurrentModificationException crash HOT 3
- java.util.ConcurrentModificationException HOT 4
- JSON serialization defaults modify property names HOT 2
- jcenter shutdown - February 2022 HOT 3
- Message.payload marked as non-nullable but can be null HOT 7
- Tries to reconnect with invalid token HOT 3
- Leaving channel causes timeout HOT 5
- `unmatched topic` after reconnect HOT 1
- Issue with AGP v8.0.0 R8 minification HOT 1
- Release 1.1.3 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from javaphoenixclient.