Why characters like “\n” are appearing in page json. | Adobe Higher Education
Skip to main content
Level 6
November 9, 2022
Resuelto

Why characters like “\n” are appearing in page json.

  • November 9, 2022
  • 1 respuesta
  • 766 visualizaciones

Hi

 

Why escape characters like “\n” are appearing in page json. What are such characters may appear in page json also

how to get original content of page. Please refer the attached screenshot for reference.

 

 

 

 

 

Este tema ha sido cerrado para respuestas.
Mejor respuesta de lukasz-m

Hi @akshaybhujbale,

In general all looks to work as expected. Please be aware that what you can see on this view

It is not content that is part of this specific page it is content of following CF /content/dam/we-retail/en/experiences/arctic-surfing-in-lofoten/arctic-surfing-in-lofoten which is referenced on the page via Content Fragment component.

Moving on, what you can see using json renderer is exactly what is in repository:

Knowing both above things, it is not possible to get referenced content using json renderer, it will only show path to referred node (CF, XF, Page etc).

Regarding \n this is part of content that you can find under text property - if you will copy value of this property into some text editor you will see some new lines as well (of course /n will be replaced by text editor with new lines). In other words \n is part of the content so this is why you can see it - if you will edit text property an paste it without new lines it will also gone from json.

One last important aspect what you see on page is not what is part of text property - despite the fact it stores very similar data like CF.

1 respuesta

lukasz-m
Community Advisor
lukasz-mCommunity AdvisorRespuesta
Community Advisor
November 9, 2022

Hi @akshaybhujbale,

In general all looks to work as expected. Please be aware that what you can see on this view

It is not content that is part of this specific page it is content of following CF /content/dam/we-retail/en/experiences/arctic-surfing-in-lofoten/arctic-surfing-in-lofoten which is referenced on the page via Content Fragment component.

Moving on, what you can see using json renderer is exactly what is in repository:

Knowing both above things, it is not possible to get referenced content using json renderer, it will only show path to referred node (CF, XF, Page etc).

Regarding \n this is part of content that you can find under text property - if you will copy value of this property into some text editor you will see some new lines as well (of course /n will be replaced by text editor with new lines). In other words \n is part of the content so this is why you can see it - if you will edit text property an paste it without new lines it will also gone from json.

One last important aspect what you see on page is not what is part of text property - despite the fact it stores very similar data like CF.

Level 6
November 11, 2022

@lukasz-m 

How to get the same content that I get from text property but without "\n"?