Skip to content

Instantly share code, notes, and snippets.

@beachside-project
Created April 15, 2016 09:41
Show Gist options
  • Save beachside-project/2e73aba250a1e059c8896724cb87f343 to your computer and use it in GitHub Desktop.
Save beachside-project/2e73aba250a1e059c8896724cb87f343 to your computer and use it in GitHub Desktop.
jsonDemo main2 JsonSerializerSettings - CamelCase
//Jsonにインデントつけるには... +JsonSerializerSettingsでキャメルケース出力
var shinobuJsonWithIndention = JsonConvert.SerializeObject(shinobu, Formatting.Indented, new JsonSerializerSettings()
{
ContractResolver = new CamelCasePropertyNamesContractResolver()
});
Console.WriteLine(shinobuJsonWithIndention);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment