Hello everyone !
We were trying to implement AEM SPA using react and consuming the model.json generated to display the data to another applications. While consuming the model.json there are some json data being coming up from the page level , which we need to trim and display only the components authored in the page. Any possible method for this approach ?
Also for example if we check the json response for the text component
Is it possible to edit " :type: " to type , without the semicolon ? Or is this a default configuration ?
Solved! Go to Solution.
Views
Replies
Total Likes
Interesting question,
I am also working on JSON generated SPA model. so there are two ways -
1. I was able to ignore it using below code in class level.
@JsonIgnoreProperties(":type")
and create a property called type and inside the getter of type just return the resourceType of model class.
2. Override the getExportedType() in your model class.
@Override
@JsonProperty("type")
public String getExportedType() {}
some more annotation if you wanna try:
https://github.com/FasterXML/jackson-annotations/wiki/Jackson-Annotations
Cheers!
Interesting question,
I am also working on JSON generated SPA model. so there are two ways -
1. I was able to ignore it using below code in class level.
@JsonIgnoreProperties(":type")
and create a property called type and inside the getter of type just return the resourceType of model class.
2. Override the getExportedType() in your model class.
@Override
@JsonProperty("type")
public String getExportedType() {}
some more annotation if you wanna try:
https://github.com/FasterXML/jackson-annotations/wiki/Jackson-Annotations
Cheers!