How to run Java API for JSON Processing(JSR 374) in eclipse?
I am trying to parse JSON string to JsonParser(javax.json.stream.JsonParser). Also add
You're developing against an API and have no implementation for that API. You need to make sure you have an implementation of the JSON-P specification to actually run the code you're trying to use.
In the JSR 374 official website Getting Started guide, it shows that you need two Maven dependencies - one for the API and one for the reference implementation - before you can use JSON-P 1.1:
<dependency>
<groupId>javax.json</groupId>
<artifactId>javax.json-api</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.json</artifactId>
<version>1.1</version>
</dependency>
Since it looks like you're not using Maven, you will need to download the implementation JAR from Maven Central manually: https://repo1.maven.org/maven2/org/glassfish/javax.json/1.1/
Or just click this direct link to download the JAR: javax.json-1.1.jar