We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to define an attribute with raw JSON?
I have got the following DTO, with the property `geoShape is raw GeoJSON JSON.
import io.leangen.graphql.annotations.GraphQLInputField; import io.leangen.graphql.annotations.GraphQLQuery; public class GeoLocation { /** * Geo */ @GraphQLQuery @GraphQLInputField private String geoShape; }
Returning the following result querying for that attribute:
{ "geoShape": "{ \"type\": \"Feature\", \"geometry\": { \"type\": \"Point\", \"coordinates\": [125.6, 10.1] }, \"properties\": { \"name\": \"Dinagat Islands\" } }" }
What I like to havem is the following:
{ "geoShape": { "type": "Feature", "geometry": { "type": "Point", "coordinates": [125.6, 10.1] }, "properties": { "name": "Dinagat Islands" } } }
I tried to add @JsonRawValue
@JsonRawValue
import com.fasterxml.jackson.annotation.JsonRawValue; import io.leangen.graphql.annotations.GraphQLInputField; import io.leangen.graphql.annotations.GraphQLQuery; public class GeoLocation { /** * Geo */ @GraphQLQuery @GraphQLInputField @JsonRawValue private String geoShape; }
But that made no difference. Also tried to use a Jackson JsonNode, instread of a String, which resulted in Runtime errors.
Do you have any advice?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Is it possible to define an attribute with raw JSON?
I have got the following DTO, with the property `geoShape is raw GeoJSON JSON.
Returning the following result querying for that attribute:
What I like to havem is the following:
I tried to add
@JsonRawValue
But that made no difference. Also tried to use a Jackson JsonNode, instread of a String, which resulted in Runtime errors.
Do you have any advice?
The text was updated successfully, but these errors were encountered: