Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Looking for JsonParser dependency

Tags:

java

json

I have worked out that JsonParser is in javax.json.stream but i have no idea where i can get a hold of it. Can anyone help me?

https://docs.oracle.com/javaee/7/api/javax/json/stream/package-summary.html

That's the library i am looking for.

I have tried looking at the maven repositories and found something similar called javax.json-api but it does not contain JsonParser.

like image 670
HashTables Avatar asked Oct 17 '25 05:10

HashTables


2 Answers

If you are using Json-simple, use the below maven dependency.

<dependency>
    <groupId>com.googlecode.json-simple</groupId>
    <artifactId>json-simple</artifactId>
    <version>1.1</version>
</dependency>

Link: https://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple/1.1

like image 129
rahulnikhare Avatar answered Oct 18 '25 18:10

rahulnikhare


If you are using maven, you can add the following dependency

<dependency>
   <groupId>javax</groupId>
   <artifactId>javaee-api</artifactId>
   <version>7.0</version>
</dependency>

you can also download the artefact manually here

http://central.maven.org/maven2/javax/javaee-api/7.0/javaee-api-7.0.jar

For Gradle, use

compile group: 'javax', name: 'javaee-api', version: '7.0'

The site https://mvnrepository.com shows you the different dependencies for different build systems.

Please note that this is only one possible dependency. You can certainly find smaller dependencies, which only contain the classes you want. Simply search for it on google or mavencentral.

like image 41
Guenther Avatar answered Oct 18 '25 19:10

Guenther



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!