示例#1
0
 public SerialisableProperties GetSerializableProperties()
 {
     return(new SerialisableProperties("reasonablyComplexObject", new List <JsonProperty> {
         new StringJsonProperty {
             Key = "name",
             Value = Name
         },
         new NumericJsonProperty {
             Key = "count",
             Value = Count
         }
     }, new List <JsonSerialisor> {
         new JsonArraySerialisor("strings", Strings, JsonPropertyType.Alphabetic),
         new JsonArraySerialisor("floats", Floats
                                 .Select(f => f.ToString(CultureInfo.InvariantCulture))
                                 .AsEnumerable(), JsonPropertyType.Numeric),
         new JsonPropertiesSerialisor(Level2.GetSerializableProperties())
     }));
 }