Questions tagged [jsr-353]

Use jsr-353 for questions related to the specification or implementation of Java Specification Request 353: Java API for JSON Processing

References

7 questions
18
votes
2 answers

JSR-353 How to add null values using javax.json.JsonObjectBuilder

AS the javax.json docs suggest the way to create a JsonObject is using the provided builders like: JsonBuilderFactory factory = Json.createBuilderFactory(config); JsonObject value = factory.createObjectBuilder() .add("firstName", "John") …
Marcel Overdijk
  • 11,041
  • 17
  • 71
  • 110
12
votes
2 answers

What are the API that does implement JSR-353 (JSON)

I just found out that Jackson does not implement JSR-353 and we already designed the module.. so i am in a desperate hurry to find a replacement of this API to begin working ! :D I searched an API that implements the standard but could not find any…
maher.belkh
  • 473
  • 2
  • 7
  • 21
12
votes
3 answers

Do Jackson and Gson directly implement the standard JSR-353?

I couldn't find an answer to my question on the net (maybe I did not search well enough, since I am still a novice on this). Could anyone tell me if Jackson and Gson implement the standard JSR 353: Java™ API for JSON Processing. I would like to…
maher.belkh
  • 473
  • 2
  • 7
  • 21
6
votes
2 answers

How to use "JSR-353: Java API for JSON Processing," without Method Chaining

I wanted to share my question/answer with using the new JSR-353 which is the Java API for JSON Processing. Specifically you can manipulate JSON data in 2 different "API" the Streaming and the Object API. If you type in "jsr-353 tutorial" into…
XaolingBao
  • 1,034
  • 1
  • 18
  • 34
2
votes
1 answer

How to write a JsonStructure (JSR-353) XmlAdaptor for JAXB MOXy?

I need to wrap some arbitrary JSON content into a POJO that is then serialized with MOXy/JAXB to JSON, but could not figure out how to bind a JsonObject with JAXB. I only need to marshall the JsonObject, unmarshalling is not required. i.e. having…
siddhadev
  • 16,501
  • 2
  • 28
  • 35
2
votes
1 answer

Is it possible to change the provider used by the standard jsr-353 api?

I am using the JSON JSR-353 api processor (jar javax.json-api-1.0.jar) to parse JSON files (using the streaming approach) and I added the JAR "javax.json-1.0.4.jar" that contains the default provider "org.glassfish.json.JsonProviderImpl" (without…
maher.belkh
  • 473
  • 2
  • 7
  • 21
0
votes
2 answers

How to append object to a json file with JSR 353 (Java API for JSON Processing)

Using JSR-353 (https://jsonp.java.net/index.html) I would like to open a json file and append some object in the root array, eg : [{"foo":"bar"}] I would like with a code about like this : try(JsonGenerator writer = Json.createGenerator(new…
Yann Le Moigne
  • 612
  • 6
  • 16