41 | | Two additional classes have been added to assist the JSON implementation in MapGuide: |
42 | | 1) The MgJsonDoc Class |
43 | | - MgJsonDoc is a wrapper over the jsoncpp implementation. MgJsonDoc provides many easy-to-use interfaces, such as Begin* and End*, for creating JSON documents from an XML perspective. For example, to create as JSON document for the corresponding XML content---<Node>Text</Node>---, one would call BeginObject("Node"), SetValue("Text"), and EndObject() subsequently. |
| 41 | Two additional classes have been added to assist the JSON implementation in !MapGuide: |
| 42 | 1) The !MgJsonDoc Class |
| 43 | - !MgJsonDoc is a wrapper over the jsoncpp implementation. !MgJsonDoc provides many easy-to-use interfaces, such as Begin* and End*, for creating JSON documents from an XML perspective. For example, to create as JSON document for the corresponding XML content---<Node>Text</Node>---, one would call !BeginObject("Node"), !SetValue("Text"), and !EndObject() subsequently. |
68 | | # GetFeatureProviders (3) |
69 | | # GetCapabilities (3) |
70 | | # GetConnectPropertyValues (1) |
71 | | # DescribeSchema (4) |
72 | | # SelectFeatures (2) |
73 | | # SelectAggregates (1) |
74 | | # GetSpatialContexts (1) |
75 | | # GetLongTransactions (1) |
76 | | # EnumerateDataStores (3) |
77 | | # GetSchemaMapping (3) |
78 | | # GetSchemas (1) |
79 | | # GetClasses (1) |
80 | | # GetClassDefinition (2) |
81 | | # GetIdentityProperties (1) |
82 | | # ExecuteSqlQuery (1) |
83 | | # GetFdoCacheInfo (4) |
| 67 | # !GetFeatureProviders (3) |
| 68 | # !GetCapabilities (3) |
| 69 | # !GetConnectPropertyValues (1) |
| 70 | # !DescribeSchema (4) |
| 71 | # !SelectFeatures (2) |
| 72 | # !SelectAggregates (1) |
| 73 | # !GetSpatialContexts (1) |
| 74 | # !GetLongTransactions (1) |
| 75 | # !EnumerateDataStores (3) |
| 76 | # !GetSchemaMapping (3) |
| 77 | # !GetSchemas (1) |
| 78 | # !GetClasses (1) |
| 79 | # !GetClassDefinition (2) |
| 80 | # !GetIdentityProperties (1) |
| 81 | # !ExecuteSqlQuery (1) |
| 82 | # !GetFdoCacheInfo (4) |
90 | | (1) Web-tier changes -- every ToXml function is matched with an ToJson function implementation that creates a JSON document in place, |
91 | | (2) Web-tier changes -- utilizes the MgXmlJsonConvert class to convert XML documents to JSON documents. |
92 | | (3) Server changes -- an extra parameter "CREFSTRING format" has been added to the respective API call; the MgXmlJsonConvert class is used if format equals to the JSON MIME type. |
93 | | (4) Server changes -- an extra API has been added matching the respective API call (e.g. DescribeSchemaAsXml has DescribeSchemaAsJson as its counter part, and GetFDOCacheInfo has GetFDOCacheInfoAsJson as its JSON specific implementation); this is because the original APIs return "STRING" and could not be efficiently adapted by the conversion process within the MgXmlJsonConvert class implementation; and for the affected APIs, the MgByteReader* is returned instead. |
| 89 | (1) Web-tier changes -- every !ToXml function is matched with an !ToJson function implementation that creates a JSON document in place, |
| 90 | (2) Web-tier changes -- utilizes the !MgXmlJsonConvert class to convert XML documents to JSON documents. |
| 91 | (3) Server changes -- an extra parameter "CREFSTRING format" has been added to the respective API call; the !MgXmlJsonConvert class is used if format equals to the JSON MIME type. |
| 92 | (4) Server changes -- an extra API has been added matching the respective API call (e.g. !DescribeSchemaAsXml has !DescribeSchemaAsJson as the JSON version, and !GetFDOCacheInfo has !GetFDOCacheInfoAsJson as its JSON specific implementation); this is because the original APIs return "STRING" and could not be efficiently adapted by the conversion process within the !MgXmlJsonConvert class implementation; and for the affected APIs, the !MgByteReader* is returned instead. |
| 93 | |