<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>how to get json from structures liferay 7.4</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121165786" />
  <subtitle>how to get json from structures liferay 7.4</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121165786</id>
  <updated>2026-04-04T14:12:36Z</updated>
  <dc:date>2026-04-04T14:12:36Z</dc:date>
  <entry>
    <title>RE: how to get json from structures liferay 7.4</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121861936" />
    <author>
      <name>Charalampos Chrysikopoulos</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121861936</id>
    <updated>2023-06-14T08:09:14Z</updated>
    <published>2023-06-14T08:09:11Z</published>
    <summary type="html">&lt;p&gt;Hi Gianluca,&lt;/p&gt;
&lt;p&gt;you could try using the following code:&lt;/p&gt;
&lt;pre&gt;
&lt;code class="language-java"&gt;        @Reference
    private com.liferay.dynamic.data.mapping.io.DDMFormSerializer ddmFormSerializer;

...


    private void getStructureJson(long groupId) {

        List&amp;lt;DDMStructure&amp;gt; structures = DDMStructureLocalServiceUtil.getStructures(groupId);
        for (DDMStructure structure : structures) {
            _log.info(&amp;quot;STRUCTURE KEY:&amp;quot; + structure.getStructureKey());
            DDMFormSerializerSerializeRequest.Builder builder = DDMFormSerializerSerializeRequest.Builder.newBuilder(structure.getDDMForm());
            DDMFormSerializerSerializeResponse ddmFormSerializerSerializeResponse =  ddmFormSerializer.serialize(builder.build());
            String json = ddmFormSerializerSerializeResponse.getContent();
            _log.info(&amp;quot;  JSON:&amp;quot; + json);
        }
    }&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;</summary>
    <dc:creator>Charalampos Chrysikopoulos</dc:creator>
    <dc:date>2023-06-14T08:09:11Z</dc:date>
  </entry>
  <entry>
    <title>how to get json from structures liferay 7.4</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121165785" />
    <author>
      <name>Gianluca Mazzilli</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121165785</id>
    <updated>2021-10-04T17:11:46Z</updated>
    <published>2021-09-24T13:35:40Z</published>
    <summary type="html">&lt;p&gt;I have a question for you, i don't understand why in this newest
  version of liferay there is no section of &amp;quot;code for the
  structure&amp;quot; for get the json.&lt;br /&gt; On liferay from 6.x to 7.3
  there were this section. There are some settings to do for this ?&lt;br /&gt;
  &lt;br /&gt; Thanks, &lt;br /&gt; Gianluca.&lt;/p&gt;</summary>
    <dc:creator>Gianluca Mazzilli</dc:creator>
    <dc:date>2021-09-24T13:35:40Z</dc:date>
  </entry>
</feed>
