= !MapGuide RFC 158 - Simplified JSON/class/schema responses and GeoJSON support =
This page contains a change request (RFC) for the !MapGuide Open Source project.
More !MapGuide RFCs can be found on the [wiki:MapGuideRfcs RFCs] page.
== Status ==
||RFC Template Version||(1.0)||
||Submission Date||12 Apr 2017||
||Last Modified||27 Apr 2017||
||Author||Jackie Ng||
||RFC Status||Adopted||
||Implementation Status||Implemented||
||Proposed Milestone||4.0||
||Assigned PSC guide(s)||(when determined)||
||'''Voting History'''||(vote date)||
||+1||Jackie,Gordon,Crispin||
||+0||||
||-0||||
||-1||||
||no vote|| ||
== Overview ==
This RFC proposes to simplify all JSON responses from the mapagent
== Motivation ==
All JSON responses from the mapagent are currently verbatim conversions from their XML counterparts.
However this conversion process results in JSON that is quite cumbersome to consume:
* All converted elements are arrays.
* All converted element content are arrays of string values.
This is due to the XML to JSON conversion process not taking the content model (and its data types/element cardinality) into account, taking the lowest common denominator approach.
Current client applications that do happen to use the JSON responses provided by the mapagent will most likely be having to employ manual "de-arrayification" of the JSON content and lots of manual string to int/double/boolean parsing to be able to work with the current JSON responses. You can see this in Fusion where there is a lot of initialization work in de-arrayification/{{{parseInt}}}/{{{parseFloat}}} of the ApplicatonDefinition and RuntimeMap JSON responses.
Another aspect of the mapagent where client applications are doing lots of unnecessary work is the responses for the {{{GETCLASSDEFINITION}}} and {{{DESCRIBESCHEMA}}} requests. The XML response for these requests are raw XML schema definitions returned by the underlying FDO APIs. The converted JSON form of this response is even more horrible to work with. MapGuide Maestro for example, has to employ manual XML parsing of these responses in order to make sense of the schemas/classes of a Feature Source, whereas with other mapagent operations it has the luxury of working with strongly-typed classes auto-generated from various XML schemas for the various responses.
This is work that client applications do not, and should not have to do.
== Proposed Solution ==
The {{{MgJsonConvert}}} class of the {{{HttpHandler}}} project that does the actual XML to JSON conversion will be modified to include a hard-coded list of XML element paths:
* For elements that contain 0 to many elements
* For elements that are not string data types
During the conversion process, we check the computed XML element path of the element/attriubte we're converting and check if it is in one of these two lists
* If it is in the first list, the element is written as a JSON array
* If it is in the second list, the element will not have its value quoted
To retain compatibility with clients using the JSON responses of the older mapagent, using simplified JSON responses is opt-in, by including {{{CLEAN=1}}} as part of your mapagent request parameters.
When this is specified, the old XML to JSON conversion behaviour will be used.
With the new JSON responses, not only are they more simpler to use (not everything is an array and not everything is a string and the content structure is semantically similar to their XML counterparts), but is also much more compact due to the amount of {{{[}}} and {{{"}}} characters we save by not converting everything to string arrays
Fusion will also be partially updated to take advantage of the new clean JSON responses:
* For initial runtime map creation ({{{CREATERUNTIMEMAP}}})
* For its selection/tooltip queries ({{{QUERYMAPFEATURES}}})
* ApplicationDefinition parsing will remain as-is because converting this to use clean JSON responses will flow on to having to update *all* current widgets that get created by this parsed appdef to use the clean JSON as well, which is too much effort for the desired payoff.
== GeoJSON output ==
For the {{{SELECTFEATURES}}} mapagent operation, even with the clean JSON response formatting applied, the JSON response is still near-useless for consumption by client applications.
For this particular operation, if we want the response in JSON, since it includes geometric data for features it is more practical to return this in GeoJSON format, which is more ubiquitous and more practical for client-application consumption.
To enable this, we'll be adding a new MgGeoJsonWriter utility class to the PlatformBase library to enable easy GeoJSON conversion from feature readers
{{{
/////////////////////////////////////////////////////////////////////////////////////////////////////////
/// \brief
/// A helper class to output GeoJSON from feature readers
///
class MG_PLATFORMBASE_API MgGeoJsonWriter : public MgGuardDisposable
{
PUBLISHED_API:
//////////////////////////////////////////////////////////////////
/// \brief
/// Constructs a MgGeoJsonWriter object
///
///
/// \htmlinclude DotNetSyntaxTop.html
/// MgGeoJsonWriter();
/// \htmlinclude SyntaxBottom.html
/// \htmlinclude JavaSyntaxTop.html
/// MgGeoJsonWriter();
/// \htmlinclude SyntaxBottom.html
/// \htmlinclude PHPSyntaxTop.html
/// MgGeoJsonWriter();
/// \htmlinclude SyntaxBottom.html
///
MgGeoJsonWriter();
//////////////////////////////////////////////////////////////////
/// \brief
/// Converts the current feature in the given feature reader to GeoJSON
///
/// \remarks
/// The id and geometry properties are inferred from the class definition returned by the feature reader
///
///
/// \htmlinclude DotNetSyntaxTop.html
/// string FeatureToGeoJson(MgFeatureReader featureReader, MgTransform transform);
/// \htmlinclude SyntaxBottom.html
/// \htmlinclude JavaSyntaxTop.html
/// String FeatureToGeoJson(MgFeatureReader featureReader, MgTransform transform);
/// \htmlinclude SyntaxBottom.html
/// \htmlinclude PHPSyntaxTop.html
/// string FeatureToGeoJson(MgFeatureReader featureReader, MgTransform transform);
/// \htmlinclude SyntaxBottom.html
///
/// \param featureReader (MgFeatureReader)
/// The feature reader
///
/// \param transform (MgTransform)
/// An optional transform
///
/// \return
/// Returns the GeoJSON output as a string.
///
STRING FeatureToGeoJson(MgFeatureReader* featureReader, MgTransform* transform);
//////////////////////////////////////////////////////////////////
/// \brief
/// Converts the current feature in the given feature reader to GeoJSON
///
///
/// \htmlinclude DotNetSyntaxTop.html
/// string FeatureToGeoJson(MgFeatureReader featureReader, MgTransform transform, string idPropertyName, string geomPropName);
/// \htmlinclude SyntaxBottom.html
/// \htmlinclude JavaSyntaxTop.html
/// String FeatureToGeoJson(MgFeatureReader featureReader, MgTransform transform, String idPropertyName, String geomPropName);
/// \htmlinclude SyntaxBottom.html
/// \htmlinclude PHPSyntaxTop.html
/// string FeatureToGeoJson(MgFeatureReader featureReader, MgTransform transform, string idPropertyName, string geomPropName);
/// \htmlinclude SyntaxBottom.html
///
/// \param featureReader (MgFeatureReader)
/// The feature reader
///
/// \param transform (MgTransform)
/// An optional transform
///
/// \param idPropertyName (String/string)
/// The name of the id property. The value of the property specified will be written to the top-level "id" property of the GeoJSON
///
/// \param geomPropName (String/string)
/// The name of the geometry property. The value of the property specified will be written to the top-level "geometry" property
/// of the GeoJSON. If this property is not specified, no geometry is written.
///
/// \return
/// Returns the GeoJSON output as a string.
///
STRING FeatureToGeoJson(MgReader* reader, MgTransform* transform, CREFSTRING idPropertyName, CREFSTRING geomPropName);
};
}}}
The {{{SELECTFEATURES}}} operation with {{{CLEAN=1}}} will use this class to output the response as GeoJSON.
This class is also available to the public API for MapGuide applications to use.
== Class Definition and Feature Schema responses ==
The current XML responses for {{{GETCLASSDEFINITION}}} and {{{DESCRIBESCHEMA}}} return verbose FDO schema XML that requires manual XML parsing from client applications to extract any meaningful information out of them. It is not a naturally decipherable description of a FDO class definition or feature schema.
The automatically converted JSON form is even more difficult to extract and parse.
As part of the simplification theme of this RFC, these 2 operations will support a new {{{SIMPLE}}} flag that if set to {{{1}}} will cause the operation to return a simplified XML response.
These simplified XML responses conform to the new {{{FeatureSchemaCollection-3.3.0.xsd}}} and {{{ClassDefinition-3.3.0.xsd}}} schemas (see attached files)
Sample XML/JSON responses for Sheboygan Parcels schema looks like this:
XML (Simple)
{{{
SHP_Schema
Parcels
false
false
SHPGEOM
SHPGEOM
The geometry of the object
102
false
WGS84 Lat/Long's, Degre
4
3
6
11
13
false
false
Autogenerated_SDF_ID
Autogenerated identity property
100
7
0
true
true
true
0
0
URL
100
9
0
true
false
false
0
0
NAME
100
9
0
true
false
false
0
0
ID
100
9
0
true
false
false
0
0
RSTATE
100
9
0
true
false
false
0
0
RYEAR
100
7
0
true
false
false
0
0
GEOEXTRA
100
7
0
true
false
false
0
0
RBLDGVC
100
7
0
true
false
false
0
0
RLDESCR1
100
9
0
true
false
false
0
0
RLANDVC
100
7
0
true
false
false
0
0
RTYPE
100
9
0
true
false
false
0
0
DETACHED_G
100
9
0
true
false
false
0
0
RACRE
100
9
0
true
false
false
0
0
RLOT
100
9
0
true
false
false
0
0
RNAME
100
9
0
true
false
false
0
0
RLDESCR2
100
9
0
true
false
false
0
0
NO_UNITS
100
7
0
true
false
false
0
0
LAST_SALE
100
5
0
true
false
false
0
0
YRBUILT
100
7
0
true
false
false
0
0
RES_BED
100
7
0
true
false
false
0
0
RES_FULL_B
100
7
0
true
false
false
0
0
RPROPAD
100
9
0
true
false
false
0
0
RES_HALF_B
100
7
0
true
false
false
0
0
KEYRLSEQ
100
9
0
true
false
false
0
0
RLDESCR3
100
9
0
true
false
false
0
0
ATTACHED_G
100
9
0
true
false
false
0
0
RCITY
100
9
0
true
false
false
0
0
RBILAD
100
9
0
true
false
false
0
0
SQFT
100
7
0
true
false
false
0
0
RSQFT
100
7
0
true
false
false
0
0
RZIP
100
7
0
true
false
false
0
0
RLDESCR4
100
9
0
true
false
false
0
0
RSECLN
100
9
0
true
false
false
0
0
GEOMAIN
100
7
0
true
false
false
0
0
RES_TTL_RO
100
9
0
true
false
false
0
0
RPROCD
100
9
0
true
false
false
0
0
RWARD
100
7
0
true
false
false
0
0
}}}
JSON (Simple, Clean)
{{{
{
"FeatureSchemaCollection": {
"@xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance",
"@xsi:noNamespaceSchemaLocation": "FeatureSchemaCollection-3.3.0.xsd",
"FeatureSchema": [
{
"Classes": {
"ClassDefinition": [
{
"DefaultGeometryPropertyName": "SHPGEOM",
"Description": null,
"IsAbstract": false,
"IsComputed": false,
"Name": "Parcels",
"Properties": {
"Property": [
{
"Description": "The geometry of the object",
"GeometryTypes": 4,
"HasElevation": false,
"HasMeasure": false,
"IsIdentity": false,
"Name": "SHPGEOM",
"PropertyType": 102,
"ReadOnly": false,
"SpatialContextAssociation": "WGS84 Lat/Long's, Degre",
"SpecificGeometryTypes": {
"Type": [
3,
6,
11,
13
]
}
},
{
"DataType": 7,
"DefaultValue": null,
"Description": "Autogenerated identity property",
"IsAutoGenerated": true,
"IsIdentity": true,
"Length": 0,
"Name": "Autogenerated_SDF_ID",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": true,
"Scale": 0
},
{
"DataType": 9,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "URL",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 9,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "NAME",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 9,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "ID",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 9,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RSTATE",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 7,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RYEAR",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 7,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "GEOEXTRA",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 7,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RBLDGVC",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 9,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RLDESCR1",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 7,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RLANDVC",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 9,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RTYPE",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 9,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "DETACHED_G",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 9,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RACRE",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 9,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RLOT",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 9,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RNAME",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 9,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RLDESCR2",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 7,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "NO_UNITS",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 5,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "LAST_SALE",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 7,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "YRBUILT",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 7,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RES_BED",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 7,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RES_FULL_B",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 9,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RPROPAD",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 7,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RES_HALF_B",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 9,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "KEYRLSEQ",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 9,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RLDESCR3",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 9,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "ATTACHED_G",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 9,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RCITY",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 9,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RBILAD",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 7,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "SQFT",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 7,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RSQFT",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 7,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RZIP",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 9,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RLDESCR4",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 9,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RSECLN",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 7,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "GEOMAIN",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 9,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RES_TTL_RO",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 9,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RPROCD",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 7,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RWARD",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
}
]
}
}
]
},
"Description": null,
"Name": "SHP_Schema"
}
]
}
}
}}}
Sample XML/JSON responses for Sheboygan Parcels class definition looks like this:
XML (Simple)
{{{
Parcels
false
false
SHPGEOM
Autogenerated_SDF_ID
Autogenerated identity property
100
true
7
0
true
true
true
0
0
URL
100
false
9
0
true
false
false
0
0
NAME
100
false
9
0
true
false
false
0
0
ID
100
false
9
0
true
false
false
0
0
RSTATE
100
false
9
0
true
false
false
0
0
RYEAR
100
false
7
0
true
false
false
0
0
GEOEXTRA
100
false
7
0
true
false
false
0
0
RBLDGVC
100
false
7
0
true
false
false
0
0
RLDESCR1
100
false
9
0
true
false
false
0
0
RLANDVC
100
false
7
0
true
false
false
0
0
RTYPE
100
false
9
0
true
false
false
0
0
DETACHED_G
100
false
9
0
true
false
false
0
0
RACRE
100
false
9
0
true
false
false
0
0
RLOT
100
false
9
0
true
false
false
0
0
RNAME
100
false
9
0
true
false
false
0
0
RLDESCR2
100
false
9
0
true
false
false
0
0
NO_UNITS
100
false
7
0
true
false
false
0
0
LAST_SALE
100
false
5
0
true
false
false
0
0
YRBUILT
100
false
7
0
true
false
false
0
0
RES_BED
100
false
7
0
true
false
false
0
0
RES_FULL_B
100
false
7
0
true
false
false
0
0
RPROPAD
100
false
9
0
true
false
false
0
0
RES_HALF_B
100
false
7
0
true
false
false
0
0
KEYRLSEQ
100
false
9
0
true
false
false
0
0
RLDESCR3
100
false
9
0
true
false
false
0
0
ATTACHED_G
100
false
9
0
true
false
false
0
0
RCITY
100
false
9
0
true
false
false
0
0
RBILAD
100
false
9
0
true
false
false
0
0
SQFT
100
false
7
0
true
false
false
0
0
RSQFT
100
false
7
0
true
false
false
0
0
RZIP
100
false
7
0
true
false
false
0
0
RLDESCR4
100
false
9
0
true
false
false
0
0
RSECLN
100
false
9
0
true
false
false
0
0
GEOMAIN
100
false
7
0
true
false
false
0
0
RES_TTL_RO
100
false
9
0
true
false
false
0
0
RPROCD
100
false
9
0
true
false
false
0
0
RWARD
100
false
7
0
true
false
false
0
0
SHPGEOM
The geometry of the object
102
false
false
WGS84 Lat/Long's, Degre
4
3
6
11
13
false
false
}}}
JSON (Simple, Clean)
{{{
{
"ClassDefinition": {
"@xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance",
"@xsi:noNamespaceSchemaLocation": "ClassDefinition-3.3.0.xsd",
"DefaultGeometryPropertyName": "SHPGEOM",
"Description": null,
"IsAbstract": false,
"IsComputed": false,
"Name": "Parcels",
"Properties": {
"Property": [
{
"DataType": 7,
"DefaultValue": null,
"Description": "Autogenerated identity property",
"IsAutoGenerated": true,
"IsIdentity": true,
"Length": 0,
"Name": "Autogenerated_SDF_ID",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": true,
"Scale": 0
},
{
"DataType": 9,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "URL",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 9,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "NAME",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 9,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "ID",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 9,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RSTATE",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 7,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RYEAR",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 7,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "GEOEXTRA",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 7,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RBLDGVC",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 9,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RLDESCR1",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 7,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RLANDVC",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 9,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RTYPE",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 9,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "DETACHED_G",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 9,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RACRE",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 9,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RLOT",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 9,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RNAME",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 9,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RLDESCR2",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 7,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "NO_UNITS",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 5,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "LAST_SALE",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 7,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "YRBUILT",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 7,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RES_BED",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 7,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RES_FULL_B",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 9,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RPROPAD",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 7,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RES_HALF_B",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 9,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "KEYRLSEQ",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 9,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RLDESCR3",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 9,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "ATTACHED_G",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 9,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RCITY",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 9,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RBILAD",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 7,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "SQFT",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 7,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RSQFT",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 7,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RZIP",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 9,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RLDESCR4",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 9,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RSECLN",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 7,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "GEOMAIN",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 9,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RES_TTL_RO",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 9,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RPROCD",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"DataType": 7,
"DefaultValue": null,
"Description": null,
"IsAutoGenerated": false,
"IsIdentity": false,
"Length": 0,
"Name": "RWARD",
"Nullable": true,
"Precision": 0,
"PropertyType": 100,
"ReadOnly": false,
"Scale": 0
},
{
"Description": "The geometry of the object",
"GeometryTypes": 4,
"HasElevation": false,
"HasMeasure": false,
"IsIdentity": false,
"Name": "SHPGEOM",
"PropertyType": 102,
"ReadOnly": false,
"SpatialContextAssociation": "WGS84 Lat/Long's, Degre",
"SpecificGeometryTypes": {
"Type": [
3,
6,
11,
13
]
}
}
]
}
}
}
}}}
== Operation Versioning ==
All affected mapagent operations that provide a JSON representation will have a new {{{3.3.0}}} operation version where the new {{{CLEAN}}} flag is supported in addition to all the parameters supported by their most recent version of their respective operation. This flag will be ignored on older operation versions.
The {{{SIMPLE}}} flag will also be supported on version {{{3.3.0}}} of {{{GETCLASSDEFINITION}}} and {{{DESCRIBESCHEMA}}} in addition to all the parameters supported by their most recent version of their respective operation. Like the {{{CLEAN}}} flag, the {{{SIMPLE}}} flag will be ignored on older versions of these operations.
== Implications ==
Any time a new schema or schema revision is introduced, this hard-coded element path list in {{{MgJsonConvert}}} will have to be updated to know which elements in these new schemas require special processing.
== Test Plan ==
Test all applicable mapagent operations with {{{CLEAN=1}}} to verify clean JSON output. Verify that {{{CLEAN}}} and {{{SIMPLE}}} parameters only kick in for affected operations if their version is {{{3.3.0}}}
== Funding / Resources ==
Community