AnsweredAssumed Answered

LabelDefinition with int parameter

Question asked by zalovich89 on Feb 8, 2019
Latest reply on May 16, 2019 by MBranscomb-esristaff

I have following StringBuilder:
"allowOverlapOfLabel": "allow" ,
"allowOverlapOfFeatureBoundary": "allow" ,
"allowOverlapOfFeatureInterior": "allow" ,
"labelExpressionInfo": {
"expression": "return $feature.Name;"},
"labelPlacement": "esriServerPointLabelPlacementCenterRight",
"multiPart": "labelPerFeature",
"minScale": "return $feature.MinScale;",
"maxScale": 0,
"symbol": {
"color": [255,255,255,255],
"haloColor": [51,51,51,255],
"haloSize": 1.5,
"font": {"size": 10, "weight": "bold"},
"type": "esriTS"}


My problem is that when doing LabelDefinition.FromJson method with this string, I get an invalid character exception on minScale value. 

MinScale attribute is a string defined in the attributes of each graphic and minScale key on the Json needs an integer. How can this conversion be done or how can I pass minScale value as a $feature value?