hmLoadTopic({
hmKeywords:"",
hmTitle:"application\/json",
hmDescription:"To explain and better understand this structure with the information in this output formats, we will use an example: the result of a reading operation. It is specifically about...",
hmPrevLink:"lk_response-types.html",
hmNextLink:"lk_application_xml.html",
hmParentLink:"lk_response-types.html",
hmBreadCrumbs:"<a href=\"lk_linkarws-operations.html\">LinkarWS Operations<\/a> &gt; <a href=\"lk_response-types.html\">Response Types and HTTP status code<\/a>",
hmTitlePath:"LinkarWS Operations > Response Types and HTTP status code > application\/json",
hmHeader:"<h1 class=\"p_Heading1\" style=\"page-break-after: avoid;\"><span class=\"f_Heading1\">application\/json<\/span><\/h1>\n\r",
hmBody:"<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\">To explain and better understand this structure with the information in this output formats, we will use an example: the result of a reading operation. It is specifically about the record read, with code 2, from the LK.ORDERS record. In the example that is shown below line breaks have been added for a better explanation of their structure.<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\"><span style=\"font-size: 1.09rem; font-weight: bold;\">JSON Format<\/span><\/p>\n\r<p class=\"p_Normal\">This is similar to the database record structure. It will use the dictionary names to create the nodes name and do nothing with the <span style=\"font-style: italic;\">mv<\/span> and <span style=\"font-style: italic;\">sv<\/span> marks.<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\">Line breaks have been added for clarity.<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\">{<\/span><\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\"> &nbsp;&quot;TOTAL_RECORDS&quot;: &quot;1&quot;,<\/span><\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\"> &nbsp;&quot;RECORDS&quot;: [{<\/span><\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\"> &nbsp; &nbsp;&quot;LKITEMID&quot;: &quot;2&quot;,<\/span><\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\"> &nbsp; &nbsp;&quot;CUSTOMER&quot;: &quot;73&quot;,<\/span><\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\"> &nbsp; &nbsp;&quot;DATE&quot;: &quot;17566&quot;,<\/span><\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\"> &nbsp; &nbsp;&quot;ITEM&quot;: &quot;101105&quot;,<\/span><\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\"> &nbsp; &nbsp;&quot;QTY&quot;: &quot;286&quot;,<\/span><\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\"> &nbsp; &nbsp;&quot;PRICE&quot;: &quot;271.18&quot;,<\/span><\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\"> &nbsp; &nbsp;&quot;DELIVERYDATE&quot;: &quot;17619ü17659&quot;,<\/span><\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\"> &nbsp; &nbsp;&quot;QTYPARTIAL&quot;: &quot;143ü143&quot;<\/span><\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\"> &nbsp; &nbsp;}<\/span><\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\"> &nbsp;]<\/span><\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\">}<\/span><\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic; font-weight: bold;\">JSON Properties<\/span><\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\" style=\"text-indent: 0; padding-left: 0.8125rem; margin-left: 0;\"><span class=\"f_Normal\" style=\"font-family: Arial,\'Lucida Sans Unicode\',\'Lucida Grande\',\'Lucida Sans\';display:inline-block;width:0.8125rem;margin-left:-0.8125rem\">&#8226;<\/span>The second level nodes names always correspond with the properties names of the LkData class. For instance in an EXECUTE operation you will find CAPTURING … and RETURNING … properties.<\/p><p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\" style=\"text-indent: 0; padding-left: 0.8125rem; margin-left: 0;\"><span class=\"f_Normal\" style=\"font-family: Arial,\'Lucida Sans Unicode\',\'Lucida Grande\',\'Lucida Sans\';display:inline-block;width:0.8125rem;margin-left:-0.8125rem\">&#8226;<\/span>All RECORD tags represent a mv record. All of them have an special property, LKITEMID, that represents the item-id of the record. They can also have another one, ORIGINAL_RECORD, that has a copy of the record in mv format. You will have this property if you have activated the option &quot;Original Record&quot; in the read. All other tags represent the record. If the attribute has a dict, the property will be the DICT. If there are not dicts, Linkar will add the word LKFLD+the attribute number (f.i. LKFLD1 for first attribute).<\/p><p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\" style=\"text-indent: 0; padding-left: 0.8125rem; margin-left: 0;\"><span class=\"f_Normal\" style=\"font-family: Arial,\'Lucida Sans Unicode\',\'Lucida Grande\',\'Lucida Sans\';display:inline-block;width:0.8125rem;margin-left:-0.8125rem\">&#8226;<\/span>Both, real attributes and calculated fields, are part of the RECORD properties. You can always know what kind of data are each one using the DICTIONARIES and LKPROPERTIES functions.<\/p><p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\"><span style=\"font-size: 1.09rem; font-weight: bold;\">JSON_DICT Format<\/span><\/p>\n\r<p class=\"p_Normal\">This format uses dictionaries data in order to create a more complex structure. It uses the data defined in Assoc or Structure attributes in the data bases that allows them. If it uses the structure (control-depend) definition like D3 it will name the groups with the MvGroup property.<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\">This only has effect inside the RECORD property, so we only show this one.<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\">{<\/span><\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\"> &nbsp;&quot;LKITEMID&quot;: &quot;2&quot;,<\/span><\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\"> &nbsp;&quot;CUSTOMER&quot;: &quot;73&quot;,<\/span><\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\"> &nbsp;&quot;DATE&quot;: &quot;17566&quot;,<\/span><\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\"> &nbsp;&quot;LstItems&quot;: [{<\/span><\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\"> &nbsp; &nbsp;&quot;ITEM&quot;: &quot;101105&quot;,<\/span><\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\"> &nbsp; &nbsp;&quot;QTY&quot;: &quot;286&quot;,<\/span><\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\"> &nbsp; &nbsp;&quot;PRICE&quot;: &quot;271.18&quot;,<\/span><\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\"> &nbsp; &nbsp;&quot;DELIVERYDATE&quot;: &quot;17619ü17659&quot;,<\/span><\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\"> &nbsp; &nbsp;&quot;QTYPARTIAL&quot;: &quot;143ü143&quot;<\/span><\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\"> &nbsp; &nbsp;}<\/span><\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\"> &nbsp;]<\/span><\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\">}<\/span><\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\">You can see that Linkar has expand the multivalue groups using the dictionary information. Each group has a property, f.i. LST_LstItems and inside it another one for each multivalue attribute of the group, LstItems.<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\">Linkar uses only dictionary information for this format, so it cannot process subvalues with this output format.<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\"><span style=\"font-size: 1.09rem; font-weight: bold;\">JSON_SCH Format<\/span><\/p>\n\r<p class=\"p_Normal\">This format uses the Linkar SCHEMAS properties, that allows it to generate even more complex structures using also subvalues.<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\">This only has effect inside the RECORD property, so we only show this one.<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\">{<\/span><\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\"> &nbsp;&quot;LKITEMID&quot;: &quot;2&quot;,<\/span><\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\"> &nbsp;&quot;CUSTOMER&quot;: &quot;73&quot;,<\/span><\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\"> &nbsp;&quot;DATE&quot;: &quot;17566&quot;,<\/span><\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\"> &nbsp;&quot;MvItems&quot;: [{<\/span><\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\"> &nbsp; &nbsp; &nbsp;&quot;ITEM&quot;: &quot;101105&quot;,<\/span><\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\"> &nbsp; &nbsp; &nbsp;&quot;QTY&quot;: &quot;286&quot;,<\/span><\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\"> &nbsp; &nbsp; &nbsp;&quot;PRICE&quot;: &quot;271.18&quot;,<\/span><\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\"> &nbsp; &nbsp; &nbsp;&quot;SvDeliveryDates&quot;: [{<\/span><\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\"> &nbsp; &nbsp; &nbsp; &nbsp;&quot;DELIVERYDATE&quot;: &quot;17619&quot;,<\/span><\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\"> &nbsp; &nbsp; &nbsp; &nbsp;&quot;QTYPARTIAL&quot;: &quot;143&quot;<\/span><\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\"> &nbsp; &nbsp; &nbsp; &nbsp;}, {<\/span><\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\"> &nbsp; &nbsp; &nbsp; &nbsp;&quot;DELIVERYDATE&quot;: &quot;17659&quot;,<\/span><\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\"> &nbsp; &nbsp; &nbsp; &nbsp;&quot;QTYPARTIAL&quot;: &quot;143&quot;<\/span><\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\"> &nbsp; &nbsp; &nbsp; &nbsp;}<\/span><\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\"> &nbsp; &nbsp; &nbsp;]<\/span><\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\"> &nbsp; &nbsp;}<\/span><\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\"> &nbsp;]<\/span><\/p>\n\r<p class=\"p_Normal\"><span style=\"font-style: italic;\">}<\/span><\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\">As you can see, now the subvalues use the same kind of structure, one property for a subvalue group, LST_SvDeliverydates, and another one for each subvalue in the group, SvDeliveryDates.<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\">Linkar can do it using the information defined in Linkar Schemas. You must define SCHEMAS in order to use this property.<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\">If you wish you can experiment with the Linkar TRAINER program, executing Read functions, with different ReadOptions to see the different results. With this program, you can execute all the available clients functions with all their options.<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r<p class=\"p_Normal\">&nbsp;<\/p>\n\r"
})
