mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-03 20:31:23 +00:00
[C#] support Json Serialization (#5752)
* support json serialization
* fix invalid json format.
* string must be written with double quotes.
* remove commma after the last object member.
* fix indent
* Revert "fix invalid json format."
This reverts commit d6820ed50c.
* quated string value.
* add cs-gen-json-serializer flag.
* fix preprocessor indent
* ENABLE_JSON_SERIALIZATION -> ENABLE_JSON_SERIALIZATION_TEST
* share TestBuffer method
* remove ENABLE_JSON_SERIALIZATION
* remove duplicated test data
* [windows] add nuget restore and copy test data.
* [docker mono] share msbuild settings with windows. add nuget restore and copy test data.
* add some note for json api.
This commit is contained in:
@@ -101,11 +101,17 @@ public struct ArrayStruct : IFlatbufferObject
|
||||
|
||||
public class ArrayStructT
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("a")]
|
||||
public float A { get; set; }
|
||||
[Newtonsoft.Json.JsonProperty("b")]
|
||||
public int[] B { get; set; }
|
||||
[Newtonsoft.Json.JsonProperty("c")]
|
||||
public sbyte C { get; set; }
|
||||
[Newtonsoft.Json.JsonProperty("d")]
|
||||
public MyGame.Example.NestedStructT[] D { get; set; }
|
||||
[Newtonsoft.Json.JsonProperty("e")]
|
||||
public int E { get; set; }
|
||||
[Newtonsoft.Json.JsonProperty("f")]
|
||||
public long[] F { get; set; }
|
||||
|
||||
public ArrayStructT() {
|
||||
|
||||
Reference in New Issue
Block a user