Changes between Version 7 and Version 8 of MapGuideRfc25
- Timestamp:
- 08/09/07 13:49:40 (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
MapGuideRfc25
v7 v8 35 35 == Proposed Solution == 36 36 37 An additioanl OEM component has been added to the source -- jsoncpp. Jsoncpp is a C++ implementation of the JSON specification (http://sourceforge.net/projects/jsoncpp/). 37 An additioanl OEM component has been added to the source -- jsoncpp. Jsoncpp is a C++ implementation of the JSON specification ([http://sourceforge.net/projects/jsoncpp/]). 38 39 ---- 38 40 39 41 Two additional classes have been added to assist the JSON implementation in !MapGuide: 40 42 41 1) The !MgJsonDoc Class 42 43 1) The !MgJsonDoc Class [[BR]] 43 44 - !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. 44 45 45 2) The !MgXmlJsonConvert Class 46 2) The !MgXmlJsonConvert Class [[BR]] 47 - !MgXmlJsonConvert converts an XML document into a JSON formatted document. 46 48 47 - !MgXmlJsonConvert converts an XML document into a JSON formatted document.49 ---- 48 50 49 51 The following Web-tier to Server APIs are affected: … … 51 53 Coordinate System 52 54 53 # !EnumerateCategories (1) 54 55 # !EnumerateCoordinateSystems (1) 55 # !EnumerateCategories (1) [[BR]] 56 # !EnumerateCoordinateSystems (1) [[BR]] 56 57 57 58 Resource 58 59 59 # !EnumerateResourceReferences (3) 60 61 # !EnumerateResources (3) 62 63 # !GetResourceContent (3) 64 65 # !GetResourceHeader (3) 66 67 # !EnumerateResourceData (3) 68 69 # !GetResourceData (3) 70 71 # !EnumerateUnmanagedData (3) 60 # !EnumerateResourceReferences (3) [[BR]] 61 # !EnumerateResources (3) [[BR]] 62 # !GetResourceContent (3) [[BR]] 63 # !GetResourceHeader (3) [[BR]] 64 # !EnumerateResourceData (3) [[BR]] 65 # !GetResourceData (3) [[BR]] 66 # !EnumerateUnmanagedData (3) [[BR]] 72 67 73 68 Feature 74 69 75 # !GetFeatureProviders (3) 76 77 # !GetCapabilities (3) 78 79 # !GetConnectPropertyValues (1) 80 81 # !DescribeSchema (4) 82 83 # !SelectFeatures (2) 84 85 # !SelectAggregates (1) 86 87 # !GetSpatialContexts (1) 88 89 # !GetLongTransactions (1) 90 91 # !EnumerateDataStores (3) 92 93 # !GetSchemaMapping (3) 94 95 # !GetSchemas (1) 96 97 # !GetClasses (1) 98 99 # !GetClassDefinition (2) 100 101 # !GetIdentityProperties (1) 102 103 # !ExecuteSqlQuery (1) 104 105 # !GetFdoCacheInfo (4) 70 # !GetFeatureProviders (3) [[BR]] 71 # !GetCapabilities (3) [[BR]] 72 # !GetConnectPropertyValues (1) [[BR]] 73 # !DescribeSchema (4) [[BR]] 74 # !SelectFeatures (2) [[BR]] 75 # !SelectAggregates (1) [[BR]] 76 # !GetSpatialContexts (1) [[BR]] 77 # !GetLongTransactions (1) [[BR]] 78 # !EnumerateDataStores (3) [[BR]] 79 # !GetSchemaMapping (3) [[BR]] 80 # !GetSchemas (1) [[BR]] 81 # !GetClasses (1) [[BR]] 82 # !GetClassDefinition (2) [[BR]] 83 # !GetIdentityProperties (1) [[BR]] 84 # !ExecuteSqlQuery (1) [[BR]] 85 # !GetFdoCacheInfo (4) [[BR]] 106 86 107 87 Rendering 108 88 109 # !GetVisibleMapExtent (1) 89 # !GetVisibleMapExtent (1) [[BR]] 110 90 111 91 where the appended labeling scheme indicates the different implementation considerations: 112 113 (1) Web-tier changes -- every !ToXml function is matched with an !ToJson function implementation that creates a JSON document in place, 114 115 (2) Web-tier changes -- utilizes the !MgXmlJsonConvert class to convert XML documents to JSON documents. 116 117 (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. 118 92 (1) Web-tier changes -- every !ToXml function is matched with an !ToJson function implementation that creates a JSON document in place, [[BR]] 93 (2) Web-tier changes -- utilizes the !MgXmlJsonConvert class to convert XML documents to JSON documents. [[BR]] 94 (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. [[BR]] 119 95 (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. 120 121 96 122 97 == Implications ==