New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raw Value serializer output json string for Spatial type #856

wants to merge 1 commit into
base: master


None yet
3 participants

xuzhg commented Jun 27, 2017



In RawValueWriter.cs, There's a function named WriteRawValue(object value), in which it has the following codes to write the Spatial object:

else if (value is Geometry || value is Geography)
   PrimitiveConverter.Instance.TryWriteAtom(value, textWriter);

However, it should call WriteJsonLight, not TryWriteAtom.

For example:

RawValueWriter target = new RawValueWriter(this.settings,, new UTF32Encoding());
var value2 = GeometryPoint.Create(1.2, 3.16);

Expected result


Actual result

RID=4326;POINT (1.2 3.16)

Checklist (Uncheck if it is not completed)

  • [ x ] Test cases added
  • [ x ] Build and test with one-click build and test script passed

Additional work necessary

@xuzhg xuzhg requested a review from mikepizzo Jun 27, 2017

@robward-ms robward-ms self-assigned this Jun 30, 2017


This comment has been minimized.


xuzhg commented Jul 4, 2017

Merged at: f49b05a

@xuzhg xuzhg closed this Jul 4, 2017

@xuzhg xuzhg deleted the xuzhg:Bug846_RawValueForSpatial branch Oct 19, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment