Questions tagged [yasson]

Yasson: https://github.com/eclipse-ee4j/yasson

29 questions
1
vote
1 answer

Ignore enum case with JSON-B / Yasson

Using JSON-B / Yasson is there any way to ignore case of enums when deserializing? public class MyObject{ MyEnum condition; //getters and setters } public enum MyEnum{ NEW, OLD, REFURBISHED; } part of incoming JSON: "condition" : "new" The…
Mark W
  • 5,824
  • 15
  • 59
  • 97
0
votes
0 answers

JsonbDeserializer deserializes JSON array into class java.lang.String

After changing yasson version to 3.0.3 JsonbDeserializer started to allow deserializing JSON array into String by taking last value from array and ignoring the rest of the values. I've checked previous yasson versions and this problem started to…
0
votes
1 answer

How to configure Json-B in RestEasy Client?

I use the RestEasy client. In the processed json object there is a base64 encoded byte array. However, the Yasson library assumes an int-coded array in the unconfigured case. How I tell the JsonConfig the BinaryDataStrategy.BASE_64? I have tried…
Superhugo
  • 1
  • 1
0
votes
1 answer

javax.json.bind-api vs. jakarta.json.bind-api

What is the difference between the two packages of the same json-b spec? Why Yasson uses the Jarkata version rather than the javax one? If I include the javax version as compile-scope dependency and Yasson as runtime-scope,
q3769
  • 192
  • 1
  • 12
0
votes
0 answers

Serialize Enum along with its fields with Jakarta Jsonb

I want to serialise an enum containing details of a web API error into JSON. The entire application is a REST API is being built with Jakarta's APIs. I am using Jakarta EE's Jsonb for serializing and deserializing to and from JSON. My enum is as…
0
votes
1 answer

Payara5 + RestEasy 6.0.1 uses Yasson

When we upgraded RestEasy to 6.0.1 on Payara 5, we noticed that Payara now uses Yasson to serialize and deserialize objects, resulting in all @JsonIgnore, @JsonProperty to be ignored. We have added the jersey.config.jsonFeature context-param as…
chrisl08
  • 1,658
  • 1
  • 15
  • 24
0
votes
1 answer

Json-B cannot deserialize JSON

when trying to deserialize this JSON the playSequenceDateRanges List is empty JSON: { "first_name": "bob", "last_name": "smith", "play_sequence_date_ranges": [ "1 - 07/30/2018 - AL", "2 - 07/30/2018 - AZ" ], …
user1421324
  • 139
  • 3
  • 9
0
votes
1 answer

Yasson not converting subclasses properly

I am building an application for payara-micro. I need to convert a Json string to an object that extends a super class. The problem that I have is that both the parent and the child's fields are not populated and the instance created is not of type…
FourtyTwo
  • 734
  • 8
  • 19
0
votes
1 answer

Date serialization ignores ContextResolver in REST request

I have an application based on Wildfly 15, which uses Yasson to serialize entities in REST requests. I use the javaee-api 8.0.1 and created a ContextResolver for configuring the date serialization format like in…
nrainer
  • 2,542
  • 2
  • 23
  • 35
0
votes
1 answer

Difference building JSON object with Yasson and Johnzon

I have the following code using the JSON Processing API (descriptor is the interface I'm trying to serialize). public void serialize(ComponentDescriptor descriptor, JsonGenerator generator, SerializationContext ctx) { …
James Baker
  • 1,143
  • 17
  • 39
0
votes
1 answer

Do I need getters on JSON binding with Yasson?

I'm trying to avoid getters and setters on my POJO but Jersey is using my getter methods to convert my POJO to JSON. I tried using Yasson but when I tried to remove my getters it just returns blank JSON. // the POJO import…
0
votes
1 answer

Does Primefaces have something with Yasson in Wildfly?

I have Wildfly 14.0.1 and due to an error (bug) in Yasson which is the default implementation of JSONB taken by RESTEASY when serializing/deserializing, I have to upgrade the version of Yasson from 1.0.1 to 1.0.4. When I change the version in…
Mike
  • 812
  • 9
  • 25
0
votes
1 answer

jsonb 1.0 / eclipse yasson ignores private properties without bean accessor methods

According to what I assume is the official user guide, http://json-b.net/users-guide.html, the engine should serialize any properties it finds, with or without bean accessor methods (I realize the Dog example uses public fields, but see the Person…
absmiths
  • 1,144
  • 1
  • 12
  • 21
0
votes
1 answer

Force JSON-B to write Numbers as Strings when generating JSON

I'm dealing with large numbers in my Java code and because of the limitations of JavaScript (namely the 32-bit support of Integers), I need to write those numbers as Strings in the JSON returned by my application. Is there a global configuration or…
Fábio
  • 3,291
  • 5
  • 36
  • 49
1
2