SOE: How to convert a Point w/ M value to JsonObject

3236
3
04-04-2016 07:59 AM
ShaningYu
Frequent Contributor

In my SOE project, I need to convert a Point feature to JsonObject.  The related code in my app is below:

       

IPoint point = gHelp.getPoint(k_Values, coordinate, pPtsColl);

JsonObject onSegPoint = Conversion.ToJsonObject(point);

        List<JsonObject> jsonGeometry = new List<JsonObject>();

The point does have X, Y and M values + geometry, etc.  However, after the conversion to JsonObject, the M value is mission.  How can this problem be solved?  Thanks.

0 Kudos
3 Replies
ShaningYu
Frequent Contributor

I tried this approach below and the problem got solved.  Thanks for your review.

        JsonObject onPoint = Conversion.ToJsonObject(point);
        onPoint.AddDouble("M", point.M);
0 Kudos
nicogis
MVP Frequent Contributor

ShaningYu
Frequent Contributor

Thanks.

0 Kudos