Пример #1
0
    // Writer
    public static void JsonSerializer(Jboy.JsonWriter writer, object instance)
    {
        writer.WriteArrayStart();

        var tree = (ArtifactTree)instance;
        foreach(var slotLevel in tree.slots) {
            writer.WriteArrayStart();

            for(int i = 0; i < slotLevel.Length; i++) {
                Jboy.Json.WriteObject(slotLevel[i].artifact, writer);
            }

            writer.WriteArrayEnd();
        }

        writer.WriteArrayEnd();
    }