Select to view content in your preferred language

Alternatives for Unsupported / Unknown JSON ?

413
3
Jump to solution
03-05-2026 05:40 PM
EricLiu
Occasional Contributor

Hi, I've been upgrading to the 200.8 runtime on .NET9, one of the deprecations is the UnsupportedJson / UnknownJson property for several classes.

For Map & Scene, there is now an UnusedJson property that I can easily parse myself without having to deserialize the entire JSON of the map.

However, for PortalItem and ArcGISFeatureTable, we were also relying on the UnsupportedJson / UnknownJson to read properties not serialized by ArcGIS. They don't have an UnusedJson property. ArcGISFeatureTable doesn't implement ToJson() either. For the table, we wouldn't want to parse the entire map's JSON since its worse for performance.

Are there plans to add UnusedJson to other classes that had UnsupportedJson / UnknownJson before ? What does Esri suggest we replace them with ? Thank you.

0 Kudos
1 Solution

Accepted Solutions
GKmieliauskas
Esri Regular Contributor

Hi,

The last ArcGIS Maps SDK for .NET API reference suggests for ArcGISFeatureTable:

UnknownJson

Gets unknown data from the source JSON.

 
Declaration
[Obsolete("To get any unrecognized JSON values, parse the result of Map.ToJson()")]
public IReadOnlyDictionary<string, object> UnknownJson { get; }

Check the text after "Obsolete"

PortalItem has UnsupportedJson / UnknownJson properties.

View solution in original post

0 Kudos
3 Replies
GKmieliauskas
Esri Regular Contributor

Hi,

The last ArcGIS Maps SDK for .NET API reference suggests for ArcGISFeatureTable:

UnknownJson

Gets unknown data from the source JSON.

 
Declaration
[Obsolete("To get any unrecognized JSON values, parse the result of Map.ToJson()")]
public IReadOnlyDictionary<string, object> UnknownJson { get; }

Check the text after "Obsolete"

PortalItem has UnsupportedJson / UnknownJson properties.

0 Kudos
EricLiu
Occasional Contributor

Thanks for clarifying, I was really hoping ArcGISFeatureTable would support its own UnusedJson property (or for ArcGISFeatureTable to support ToJson()). Parsing the entire Map object seems excessive when I only want to read Unknown / Unsupported Json of just the ArcGISFeatureTable.

For PortalItems its not too bad though, the entire JSON isn't too large.

0 Kudos
dotMorten_esri
Esri Notable Contributor

Parsing the entire Map object seems excessive

You don't need to parse everything. Only the bits you're interested in. The problem with Unknown/Unsupported json is that each release what is unknown/unsupported might change, as more and more things gets known or supported, so you can't really rely on the values when you upgrade. Another downside is that it didn't really fully support a full json tree structure, so it was already somewhat limited.

While we considered exposing the full set of traversable JSON objects in the API, all the native maps SDKs already provide great JSON support out of the box (like System.Text.Json), so we decided to just give you full access to all the JSON and let the platform APIs do the work.

0 Kudos