Skip to content
Advertisement

Tag: json

com.sap.cloud.sdk.datamodel.odata render empty fields

In the context of an OData update request we run into an error response from the SAP service called. We are using com.sap.cloud.sdk.datamodel:odata-core in version 3.65.0. The Method in Question is com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperUpdate.executeRequest(). When serializing in REST calls with data from com.sap.cloud.sdk.datamodel.odata, empty fields are also rendered into the output: This fails on the SAP side with HttpResult 400 – bad

Streaming large JSON from input stream efficiently in Java

In order to save memory and avoid an OOM error, I want to stream a large JSON from an input stream and extract the desired things from it. More exactly, I want to extract and save some strings from that JSON: files.content.fileContent.subList.text = “some text in file” files.content.fileContent.subList.text = “some text in file2” and save them into a String variable:

Java Spring omits fields when making a JSON

I have an object that looks more or less like this, and I use it as a GET response for my API. scores and values are both database entities. I wanted to add a String to the response with some additional information. What happens is that the objects are properly turned into a JSON and they show up in the

Java Spring Boot consuming API with nested object returns NULL

I’m playing around with spring boot trying to consume a third parties rest api. The API call I’m using returns the below JSON object. My code successfully consumes this JSON object however it returns this. Note that rates={BTC=’null’} should be rates={BTC=’39049.424242′}. Any help is greatly appreciated. Below is my code LiveData.java Rates.java ConsumingRest.java (main) Answer You can user @JsonProperty annotation.

How to extract JSON from sql query?

My query looks like this: I want to retry the messages that failed, but the message is a json string and the offset is a regular string. I need to extract the json messages and the offset strings and then iterate through each row. How would I do this? RIght now I am doing something like this: //Service buildQueryResult() simply

format a json of a class in spring

I am new with spring and I want the json response of my class public class Mapping { public String name; public Object value; } be changed from {“name” : ‘value of field name’, “value”: ‘value of field value’} to {‘value of field name’ : ‘value of field value’} I tried @JsonValue and @JsonKey but they didn`t work. how can

Error Meta-data: {“dataFile”:”resources/env1/data.json”}@scenarios/jsonformfiller.feature#5 TestStep implementation not found

Error Meta-data: {“dataFile”:”resources/env1/data.json”,”description”:”Data driven test that uses enter code herejson file to provide data”}@scenarios/jsonformfiller.feature#5 TestStep implementation not found. Please provide implementation or ensure ‘step.provider.pkg’ property value includes appropriate package. Step Definition Could not include the whole step definitons code here stack overflow warning me that i added too much code Step Definition – all feature file test steps are defined

Advertisement