Skip to content

Instantly share code, notes, and snippets.

@mythz
Created October 20, 2016 15:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mythz/386f05f89cf693e5db39fab4ef834ecb to your computer and use it in GitHub Desktop.
Save mythz/386f05f89cf693e5db39fab4ef834ecb to your computer and use it in GitHub Desktop.
Serialize anonymous object
using ServiceStack;
using ServiceStack.Text;
var ProfileData = new { XYZ = "XYZ", DEF = "DEF"};
var clearJSON = ProfileData.ToJson();
clearJSON.Print();
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="ServiceStack.Text" version="4.0.62" targetFramework="net45" />
</packages>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment