skip to Main Content

Json – Why camel-case fields are not recognized by API?

I have defined my request class like: @Data @AllArgsConstructor @NoArgsConstructor public class SampleRequest { @NotBlank private String firstName; private String middleName; @NotBlank private String lastName; } Controller as: @PostMapping(path = "mydetails", consumes = {MediaType.APPLICATION_JSON_VALUE}) public DeferredResult<DetailsResponse> saveMyDetails(@Validated @RequestBody SampleRequest sampleRequest)…

VIEW QUESTION

Failed to open json file

I need to load a JSON file and copy it into a string buffer but it is failing to open the file. What could be the problem, can I use any other method? My JSON file is as follows: {…

VIEW QUESTION
Back To Top
Search