I am trying to grab the labeling info from a DynamicMapServiceLayer and add that to my featurelayer. Currently, a query is sent to the DynamicMapService and returns with the requested FeatureSet.FYI, part of the reason we are doing it this way is so that we can add customized flare clusters.At this point, we'd like to grab the labeling info and add to the map.
JObject obj = JObject.Parse(strConfig);
string strRenderer = (obj["drawingInfo"]["renderer"]).ToString();
_resultRenderer = Renderer.FromJson(strRenderer);
_textRenderer = (obj["drawingInfo"]["labelingInfo"]).ToString();
TextSymbol textSymbol = (TextSymbol)TextSymbol.FromJson(_textRenderer);
Note: _resultRenderer returns a valid object, but textSymbol ALWAYS returns null. If I don't put it in the correct format the .FromJson method will complain, so it doesn't appear to be a formatting issue.Here is the string "_textRenderer":"[\r\n {\r\n \"labelPlacement\": \"esriServerPointLabelPlacementCenterCenter\",\r\n \"labelExpression\": \"[NOTIFICATIONTYPE]\",\r\n \"useCodedValues\": true,\r\n \"symbol\": {\r\n \"type\": \"esriTS\",\r\n \"color\": [\r\n 255,\r\n 255,\r\n 255,\r\n 255\r\n ],\r\n \"backgroundColor\": null,\r\n \"borderLineColor\": null,\r\n \"verticalAlignment\": \"bottom\",\r\n \"horizontalAlignment\": \"center\",\r\n \"rightToLeft\": false,\r\n \"angle\": 0,\r\n \"xoffset\": 0,\r\n \"yoffset\": 0,\r\n \"font\": {\r\n \"family\": \"Arial\",\r\n \"size\": 6,\r\n \"style\": \"normal\",\r\n \"weight\": \"normal\",\r\n \"decoration\": \"none\"\r\n }\r\n },\r\n \"minScale\": 0,\r\n \"maxScale\": 0\r\n }\r\n]";