Azure / azure-cosmosdb-java

Java Async SDK for SQL API of Azure Cosmos DB
MIT License
54 stars 61 forks source link

Avoid usage of org.json library #29

Closed chetanmeh closed 6 years ago

chetanmeh commented 6 years ago

The driver currently has a dependency on org.json

 <dependency>
      <groupId>org.json</groupId>
      <artifactId>json</artifactId>
      <version>20140107</version>
</dependency>

This library license is marked as Category-X and hence such a library cannot be used as a dependency in Apache Project. Would it be possible to replace this library with some other json library? Otherwise it would become tricky to use azure-cosmosdb-java for Apache projects

moderakh commented 6 years ago

@chetanmeh are you considering using the sdk as a dependency for a open source apache project? or is your question more of a general question?

chetanmeh commented 6 years ago

@moderakh We plan to use this driver for implementing a CosmosDB backend for Apache OpenWhisk.

moderakh commented 6 years ago

@chetanmeh you opened also another issue about moving to RxJava2. Moving away from org.json can be done with less effort comparing to moving RxJava2.

I wonder if we replace org.json with some other apache friendly dependency, that will unblock you for now?

chetanmeh commented 6 years ago

I wonder if we replace org.json with some other apache friendly dependency, that will unblock you for now?

+1. That would be very helpful as org.json dependency is a blocker for us. RxJava update is something that can be picked up later given that its already being worked upon

moderakh commented 6 years ago

@srinathnarayanan we should be able to rely only on jackson lib and drop the dependency on org.json lib.

I am assigning this to you. Please take a look.

otaviojava commented 6 years ago

Just my two cents: One suggestion would be json-p

JSON-P is a Java request specification, JSR 353 , and it has multiples implementations, that includes Jackson itself. Also, the user is able to replace the implementation without impact the code if they want to.

chetanmeh commented 6 years ago

@moderakh @srinathnarayanan Would it be possible to share some details on when a sdk release with json changes can be expected?

moderakh commented 6 years ago

@chetanmeh As this has breaking changes we had to do some internal testing. This will be in our June release.

moderakh commented 6 years ago

@chetanmeh version sdk 2.0.0 with the changes for removing org.json is released to maven: http://central.maven.org/maven2/com/microsoft/azure/azure-cosmosdb/2.0.0/

Thanks for your help and collaboration.

chetanmeh commented 6 years ago

Many thanks @moderakh for accommodating such a major change! Now OpenWhisk CosmosDB PR can be merged :)