<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to Display a Json-String in SAP-Browser in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-display-a-json-string-in-sap-browser/m-p/9378919#M1733862</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rüdiger,&lt;/P&gt;&lt;P&gt;thanks for the explanation an the further information &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Damir&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Apr 2013 18:01:10 GMT</pubDate>
    <dc:creator>majcon</dc:creator>
    <dc:date>2013-04-11T18:01:10Z</dc:date>
    <item>
      <title>How to Display a Json-String in SAP-Browser</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-display-a-json-string-in-sap-browser/m-p/9378912#M1733855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://answers.sap.com/people/horst.keller/blog/2013/01/07/abap-and-json"&gt;http://scn.sap.com/people/horst.keller/blog/2013/01/07/abap-and-json&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after executing the above example I got an String with the Json-Interpretation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any SAP-Standard Functionality to Display the Json as elegant as XML-String:&lt;/P&gt;&lt;P&gt;for example &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; cl_abap_browser&lt;SPAN class="L0S70"&gt;=&amp;gt;show_xml&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;exporting &lt;/SPAN&gt;xml_string &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;iv_xml_string &lt;SPAN class="L0S55"&gt;)&lt;/SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S70"&gt;Thanks, for your help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S70"&gt;Cheers,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S70"&gt;Damir&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S70"&gt;only for Information sap-system:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;SAP_BASIS&amp;nbsp;&amp;nbsp;&amp;nbsp; 702&amp;nbsp;&amp;nbsp;&amp;nbsp; 0012&amp;nbsp;&amp;nbsp;&amp;nbsp; SAPKB70212&amp;nbsp;&amp;nbsp;&amp;nbsp; SAP Basis Component&lt;/P&gt;&lt;P&gt;SAP_ABA&amp;nbsp;&amp;nbsp;&amp;nbsp; 702&amp;nbsp;&amp;nbsp;&amp;nbsp; 0012&amp;nbsp;&amp;nbsp;&amp;nbsp; SAPKA70212&amp;nbsp;&amp;nbsp;&amp;nbsp; Cross-Application Component&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Apr 2013 14:00:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-display-a-json-string-in-sap-browser/m-p/9378912#M1733855</guid>
      <dc:creator>majcon</dc:creator>
      <dc:date>2013-04-09T14:00:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to Display a Json-String in SAP-Browser</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-display-a-json-string-in-sap-browser/m-p/9378913#M1733856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Damir,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanx for declaring cl_abap_browser as "elegant'" &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/1353/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;, it is a class that I've programmed once for my own purposes for displaying html in examples of the ABAP Documentation and now it is "SAP-Standard Functionality" &lt;SPAN __jive_emoticon_name="cool" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/1353/images/emoticons/cool.gif"&gt;&lt;/SPAN&gt;. Maybe it's because of the name &lt;SPAN __jive_emoticon_name="devil" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/1353/images/emoticons/devil.gif"&gt;&lt;/SPAN&gt;....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Well, cl_abap_browser is simply a convenience tool that encapsulates CL_GUI_HTML_VIEWER. Since the browser used by CL_GUI_HTML_VIEWER understands XM automatically, it was simple to offer SHOW_XML-methods.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For JSON it is not that simple. If you have transaction STDEMO (program STRANSDEMO_FLIGHTS) in your system, you can see an individual example, where JSON-data are formatted for display. The trick used there is to call an XSLT-program SJSON2HTML that transforms JSON (aka JSON-XML) to HTML. And no, that is not my program ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For my own purposes, I followed a more simplistic way. You can introduce linebreaks and indents into any JSON-string as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lv_xjson = ... &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;SPAN class="L0S52"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATA&lt;SPAN class="L0S55"&gt;(&lt;/SPAN&gt;reader&lt;SPAN class="L0S55"&gt;) &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;cl_sxml_string_reader&lt;SPAN class="L0S70"&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;create&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;lv_xjson &lt;SPAN class="L0S55"&gt;)&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;DATA&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;(&lt;/SPAN&gt;writer&lt;SPAN class="L0S55"&gt;) &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;CAST if_sxml_writer&lt;SPAN class="L0S55"&gt;(&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cl_sxml_string_writer&lt;SPAN class="L0S70"&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;create&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;type &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;if_sxml&lt;SPAN class="L0S70"&gt;=&amp;gt;&lt;/SPAN&gt;co_xt_json &lt;SPAN class="L0S55"&gt;) &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;)&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; writer&lt;SPAN class="L0S70"&gt;-&amp;gt;&lt;/SPAN&gt;set_option&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;option &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;if_sxml_writer&lt;SPAN class="L0S70"&gt;=&amp;gt;&lt;/SPAN&gt;co_opt_linebreaks &lt;SPAN class="L0S55"&gt;)&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; writer&lt;SPAN class="L0S70"&gt;-&amp;gt;&lt;/SPAN&gt;set_option&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;option &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;if_sxml_writer&lt;SPAN class="L0S70"&gt;=&amp;gt;&lt;/SPAN&gt;co_opt_indent &lt;SPAN class="L0S55"&gt;)&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; reader&lt;SPAN class="L0S70"&gt;-&amp;gt;&lt;/SPAN&gt;next_node&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;)&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; reader&lt;SPAN class="L0S70"&gt;-&amp;gt;&lt;/SPAN&gt;skip_node&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;writer &lt;SPAN class="L0S55"&gt;)&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;DATAT(lv_json) &lt;SPAN class="L0S55"&gt;= cl_abap_codepage&lt;SPAN class="L0S70"&gt;=&amp;gt;&lt;/SPAN&gt;convert_from&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55" style="font-family: courier new,courier;"&gt;&lt;SPAN class="L0S55"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;CAST cl_sxml_string_writer&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;writer &lt;SPAN class="L0S55"&gt;)&lt;/SPAN&gt;-&amp;gt;get_output&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;) &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;)&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(OK, ok, you might not know what DATA( ) and CAST is about. DATA( ) is a new operator for inline declarations coming with release 7.40 that you must replace with DATA statements in older releases. CAST is a new casting operator coming with release 7.40 that you must replace with ?= and helper variables in older releases.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After having the linebreaks and indents in JSON, it is not so complicated any more to transform that to html (string templates |\n| can be involved here ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently I have no plans to extent CL_ABAP_BROWSER with a SHOW_JSON-Method, since it should be kept as wrapper for browser functionality. If browsers format JSON one day, I might add it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead, in releases 7.31/7.40 I am "playing around" with a small framework to replace WRITE-statements in the example programs of the ABAP Documentation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With that, a formatted (but not interactive) output for JSON can be achieved as follows (as of 7.31 SP something):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cl_demo_output&lt;SPAN class="L0S70"&gt;=&amp;gt;display_json&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;json &lt;SPAN class="L0S55"&gt;)&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S70"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S70"&gt;&lt;SPAN class="L0S55"&gt;But&amp;nbsp; - of course - CL_DEMO_OUTPUT is not released for productive usage &lt;SPAN __jive_emoticon_name="wink" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/1353/images/emoticons/wink.gif"&gt;&lt;/SPAN&gt; ...&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Apr 2013 08:05:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-display-a-json-string-in-sap-browser/m-p/9378913#M1733856</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2013-04-10T08:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to Display a Json-String in SAP-Browser</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-display-a-json-string-in-sap-browser/m-p/9378914#M1733857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Horst,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you for your helpful answer! It direct´s me to the right direction &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_macro_emoticon jive_emote" src="https://community.sap.com/1353/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Damir&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Apr 2013 08:26:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-display-a-json-string-in-sap-browser/m-p/9378914#M1733857</guid>
      <dc:creator>majcon</dc:creator>
      <dc:date>2013-04-10T08:26:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to Display a Json-String in SAP-Browser</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-display-a-json-string-in-sap-browser/m-p/9378915#M1733858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Damir, the debugger uses the XSLT transformation SJSON2HTML to visualize JSON. Try it out: When you pass a JSON data object in its SAP-internal XML representation ( with &amp;lt;object&amp;gt;'s, &amp;lt;array&amp;gt;'s, &amp;lt;str&amp;gt;'s and so on), this transformation creates HTML code which visualizes it. You can use this transformation, and then pass the created HTML code to an HTML control. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rüdiger&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For SAP-employees, the author gave his D-number &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; d026228&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Apr 2013 13:27:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-display-a-json-string-in-sap-browser/m-p/9378915#M1733858</guid>
      <dc:creator>Ruediger_Plantiko</dc:creator>
      <dc:date>2013-04-10T13:27:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to Display a Json-String in SAP-Browser</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-display-a-json-string-in-sap-browser/m-p/9378916#M1733859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For illustration, here is a screenshot of the result of the built-in transformation SJSON2HTML on a JSON object in the debugger. I like it - it is even interactive: You can open and close nodes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/204109" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Apr 2013 02:59:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-display-a-json-string-in-sap-browser/m-p/9378916#M1733859</guid>
      <dc:creator>Ruediger_Plantiko</dc:creator>
      <dc:date>2013-04-11T02:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to Display a Json-String in SAP-Browser</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-display-a-json-string-in-sap-browser/m-p/9378917#M1733860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;OK, ok, you might not know what DATA( ) and CAST is about. DATA( ) is a new operator for inline declarations coming with release 7.40 that you must replace with DATA statements in older releases. CAST is a new casting operator coming with release 7.40 that you must replace with ?= and helper variables in older releases&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for disclosing a few 740 release offerings &lt;SPAN __jive_emoticon_name="devil" __jive_macro_name="emoticon" class="jive_macro jive_macro_emoticon jive_emote" src="https://community.sap.com/1353/images/emoticons/devil.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Apr 2013 07:27:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-display-a-json-string-in-sap-browser/m-p/9378917#M1733860</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2013-04-11T07:27:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to Display a Json-String in SAP-Browser</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-display-a-json-string-in-sap-browser/m-p/9378918#M1733861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You wouldn't believe your eyes if I'd publish a fully fledged 7.40 ABAP program here ... &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Apr 2013 07:34:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-display-a-json-string-in-sap-browser/m-p/9378918#M1733861</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2013-04-11T07:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to Display a Json-String in SAP-Browser</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-display-a-json-string-in-sap-browser/m-p/9378919#M1733862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rüdiger,&lt;/P&gt;&lt;P&gt;thanks for the explanation an the further information &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Damir&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Apr 2013 18:01:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-display-a-json-string-in-sap-browser/m-p/9378919#M1733862</guid>
      <dc:creator>majcon</dc:creator>
      <dc:date>2013-04-11T18:01:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to Display a Json-String in SAP-Browser</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-display-a-json-string-in-sap-browser/m-p/9378920#M1733863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A simple one ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;DATA json_writer &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;REF &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TO &lt;/SPAN&gt;cl_sxml_string_writer&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="L0S52"&gt;DATA &lt;/SPAN&gt;writer &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;REF &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TO &lt;/SPAN&gt;if_sxml_writer&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;json_writer &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;cl_sxml_string_writer&lt;SPAN class="L0S70"&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;create&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;type &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;if_sxml&lt;SPAN class="L0S70"&gt;=&amp;gt;&lt;/SPAN&gt;co_xt_json &lt;SPAN class="L0S55"&gt;)&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;writer ?= json_writer&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;writer&lt;SPAN class="L0S70"&gt;-&amp;gt;&lt;/SPAN&gt;set_option&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;option &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;if_sxml_writer&lt;SPAN class="L0S70"&gt;=&amp;gt;&lt;/SPAN&gt;co_opt_linebreaks &lt;SPAN class="L0S55"&gt;)&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;writer&lt;SPAN class="L0S70"&gt;-&amp;gt;&lt;/SPAN&gt;set_option&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;option &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;if_sxml_writer&lt;SPAN class="L0S70"&gt;=&amp;gt;&lt;/SPAN&gt;co_opt_indent &lt;SPAN class="L0S55"&gt;)&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="L0S52"&gt;CALL &lt;/SPAN&gt;TRANSFORMATION &lt;SPAN class="L0S52"&gt;id &lt;/SPAN&gt;SOURCE ...&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RESULT XML json_writer&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="L0S52"&gt;DATA &lt;/SPAN&gt;json &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;string&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;json &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;cl_abap_codepage&lt;SPAN class="L0S70"&gt;=&amp;gt;&lt;/SPAN&gt;convert_from&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;json_writer&lt;SPAN class="L0S70"&gt;-&amp;gt;&lt;/SPAN&gt;get_output&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;) &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;)&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;cl_demo_text&lt;SPAN class="L0S70"&gt;=&amp;gt;&lt;/SPAN&gt;show_string&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;json &lt;SPAN class="L0S55"&gt;)&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Apr 2013 09:53:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-display-a-json-string-in-sap-browser/m-p/9378920#M1733863</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2013-04-13T09:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to Display a Json-String in SAP-Browser</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-display-a-json-string-in-sap-browser/m-p/9378921#M1733864</link>
      <description>&lt;P&gt;Hi Rüdiger,&lt;/P&gt;&lt;P&gt;I've tried to check how that "Detail display" is processed, but you can't debug a debugger &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;BR /&gt;Could you please let me know how you've achieved that display in the debugger?&lt;BR /&gt;Have you enhanced cl_abap_browser class?&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Adam&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jan 2021 13:44:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-display-a-json-string-in-sap-browser/m-p/9378921#M1733864</guid>
      <dc:creator>aszymanski</dc:creator>
      <dc:date>2021-01-15T13:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to Display a Json-String in SAP-Browser</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-display-a-json-string-in-sap-browser/m-p/9378922#M1733865</link>
      <description>&lt;P&gt;Hi Adam, if the field that you want to display is an XSTRING holding an UTF8-encoded valid JSON-Objekt, then it should be displayed in the above style in the view "XML Browser". As mentioned, the XSLT transformation SJSON2HTML is used internally to generate the html code that then is displayed in the HTML viewer control.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jan 2021 13:49:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-display-a-json-string-in-sap-browser/m-p/9378922#M1733865</guid>
      <dc:creator>Ruediger_Plantiko</dc:creator>
      <dc:date>2021-01-15T13:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to Display a Json-String in SAP-Browser</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-display-a-json-string-in-sap-browser/m-p/9378923#M1733866</link>
      <description>&lt;P&gt;Addition to my last comment: This should be standard behaviour. I didn't change CL_ABAP_BROWSER or did anything sophisticated. The detection that this XSTRING is an UTF-8 encoded JSON object goes behind the scenes.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jan 2021 13:51:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-display-a-json-string-in-sap-browser/m-p/9378923#M1733866</guid>
      <dc:creator>Ruediger_Plantiko</dc:creator>
      <dc:date>2021-01-15T13:51:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to Display a Json-String in SAP-Browser</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-display-a-json-string-in-sap-browser/m-p/9378924#M1733867</link>
      <description>&lt;P&gt;Hi Rüdiger,&lt;BR /&gt;thanks for your explanation.&lt;BR /&gt;My fault was trying to display STRING like that.&lt;/P&gt;&lt;P&gt;I've changed to XSTRING and all of a sudden magic is happening &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2021 08:25:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-display-a-json-string-in-sap-browser/m-p/9378924#M1733867</guid>
      <dc:creator>aszymanski</dc:creator>
      <dc:date>2021-01-21T08:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to Display a Json-String in SAP-Browser</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-display-a-json-string-in-sap-browser/m-p/13693141#M2027935</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;This answer helped me to solve a problem.&lt;/P&gt;&lt;LI-CODE lang="abap"&gt;  DATA:
    lv_xstring      TYPE xstring,
    lv_xjson        TYPE xstring,
    lv_json         TYPE string,
    lo_reader       TYPE REF TO if_sxml_reader,
    lo_json_writer  TYPE REF TO cl_sxml_string_writer,
    lo_writer       TYPE REF TO if_sxml_writer.

  lv_xstring = " json xstring content

  " Create writer for json
  lo_json_writer = cl_sxml_string_writer=&amp;gt;create( type = if_sxml=&amp;gt;co_xt_json ).

  " set linebreak and indentation
  lo_writer ?= lo_json_writer.
  lo_writer-&amp;gt;set_option( option = if_sxml_writer=&amp;gt;co_opt_linebreaks ).
  lo_writer-&amp;gt;set_option( option = if_sxml_writer=&amp;gt;co_opt_indent ).

  " Create reader for xstring content
  lo_reader = cl_sxml_string_reader=&amp;gt;create( lv_xstring ).
  lo_reader-&amp;gt;next_node( ).
  lo_reader-&amp;gt;skip_node( lo_writer ).

  " Get formatted xstring
  lv_xjson = lo_json_writer-&amp;gt;get_output( ).

  " Get formatted string
  lv_json = cl_abap_codepage=&amp;gt;convert_from( lx_xjson ).

  " Display content
  cl_demo_text=&amp;gt;show_string( lv_json ).&lt;/LI-CODE&gt;&lt;P&gt;My solution is something like above code. Get a json xstring and get a formatted content, but instead of using CALL TRANSFORMATION, I use `SXML_READER` to get content and pass to writer.&lt;/P&gt;&lt;P&gt;Maybe it can help someone else.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Danilo&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2024 21:36:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-display-a-json-string-in-sap-browser/m-p/13693141#M2027935</guid>
      <dc:creator>danilo_yorinori</dc:creator>
      <dc:date>2024-05-06T21:36:44Z</dc:date>
    </item>
  </channel>
</rss>

