Skip to main content

Notifications

Community site session details

Community site session details

Session Id : a904TEdXqolnNZgaoxvuO7
Power Pages - Power Apps Portals
Answered

Not able to read the Json return from liquid code because of HTML text are in different line

Like (0) ShareShare
ReportReport
Posted on 24 Jul 2020 10:14:32 by

Hi Experts,

 

I am reading an entity data which have one field (data type: multiline text ) that consist HTML scripts but I am getting below error while reading the data:

Uncaught SyntaxError: Unexpected token 
 in JSON at position 332

 Json ErrorJson Error

 

How can I resolve this? Any help will be appreciable.

Thanks,

Amit

  • Verified answer
    Community Power Platform Member Profile Picture
    on 27 Jul 2020 at 08:39:39
    Re: Not able to read the Json return from liquid code because of HTML text are in different line

    Hi @yashag2255 @gt_ 

    Thanks for the response but I got the solution for this i.e | strip_newlines liquid filter makes all in one line.

     

    Thanks,

    Amit

  • yashag2255 Profile Picture
    24,442 Super User 2024 Season 1 on 25 Jul 2020 at 07:11:24
    Re: Not able to read the Json return from liquid code because of HTML text are in different line

    Hi @Anonymous

     

    Power Apps Portals does not recognize value of a key in JSON that is passed in multiple lines. You need to keep the value in a single line to make it work.

     

    You can update the JSON to either below mentioned snippet or add backslash towards the end of line so that the system knows there is a continuation.

     

    "KA_Content":"Es un articulo de pruba <br><strong>Para no ver en el portal</string><br>&nbsp;"

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • gt_ Profile Picture
    10 on 24 Jul 2020 at 12:31:02
    Re: Not able to read the Json return from liquid code because of HTML text are in different line

    Try adding backslashes like this example demonstrates. For you, it should be:

     

    "KA_Content": "Es un artĂ­culo de prueba<br>\

    <strong>Para no ver en el portal</strong><br>\

    &nbsp;\

    ",

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Pages - Power Apps Portals

Overall leaderboard
Loading started