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 …

Handle Response Kotlin Retrofit

I’m new to Kotlin and android development. Have been struggling to get my retrofit api to work. But have found a way to do it after some search on SO. I get the data response now, but I don’t know how …

How to send post request in java with a JSON body

I am confused as to how to send a post request in Java with JSON parameters. I have seen many examples that use HttpPost library which I can not access. Below is my code: public class endpointtest { …

How to parse this json with multiple objects

devs I am stuck in parsing this kind of JSON I don’t understand how to get the value of status and message any help will be very appreciable. I get the value of error but when I want to access the …

Unable to find data in DTO from JSON object – parsing error ZonedDateTime

I am trying to convert the JSON timestamp object into Java I have researched converting a JSON string to java but unsure what I’m looking for. I can get it to work if the JSON uses an array but …

Find passwords values in JSON objects using Regex

I have a big JSON object which contains a lot of different JSON, most of them have the structure below (key: sometext-v1.password, and value: password for example: “apps”:[ “…

JaxbDto Serialization and deserialization

I need to receive some message with SOAP so I’ve generated a few classes by xsd-scheme and maven-jaxb2-plugin like this: @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = “Claim”, …

How to serialize a class that extends TreeSet with Jackson?

Class A looks like this: @EqualsAndHashCode(callSuper = true) @Data @AllArgsConstructor public final class A extends TreeSet { private final a; private b; private c; public …