Sending JSON Data to JPOS Based Project but failed in unpacking field 34

Request that i send : {“transactionid”:”12″, “ISOMsg”:”010046552063310518890000000000000123001203210541330012003255399022004655206331051889=…

Error parsing JSON (MismatchedInputException)

I’m having problems parsing JSON, this is the error: out of START_OBJECT token; nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java….

How to create Array of Objects using the Jackson Streaming API

I am trying to create a JSON using the Jackson Streaming API. I know how to create an array of elements in JSON using Jackson as we have plenty of examples related to it. But I am a bit confused about …

Spring Jackson deserialize object with reference to existing object by Id

I have three entity classes of the following: Shipments Entity: @Entity @Table(name = “SHIPMENT”) public class Shipment implements Serializable { @Id @GeneratedValue(strategy = …

App crashes when connection is lost while using HttpUrlConnection

i’m making a class that get json data from an external url, it is working fine if there is a connection. also shows an error if there isn’t. the problem is if the connection lost while the class is …

Generate a random according to criteria [closed]

I have a JSON File (ArrayList) with some Restaurants and km(miles) from my Workplace to the Restaurant. The User can choose how far away the Restaurant should be (5km, 10km..) after that should the …

java.util.Date is parsing wrong dates with dates before 1912

I don’t understand the reason why Jackson library is parsing wrong dates before 1912. I suppose the problem is the java.util.Date conversion, because the problem persists with Gson. This is my code: …

Restrict string data type to only string types for request body in Spring boot 2.4 (Jackson)

I have created my request POJO as follows @JsonInclude(JsonInclude.Include.NON_NULL) public class Notification { @NotNull private String clientId; private String userId; @NotNull …

Storing lots of small records for sub millisecond latency retrieval

I have a use case for needing to be able to retrieve a document (~1.5kb) from some store with latency of < 1ms if possible. The store will contain at least 2-3 million such documents. Sample ...

How to pass JSON Object and return Object from Spring rest controller

I have an entity class like below: public class InputData { byte[] nameBytes; InputType inputType; InputType outputType; String inputName; Description desc; } Here is my rest …