Skip to content

Nested structures do not work. (array of array of classes) #18

Closed
@janedegtiareva

Description

@janedegtiareva

fiddle that reproes https://studio.nearprotocol.com/?f=opapxvcfg

fails on assert(name == null); in the following code

      buffer: Uint8Array;
      decoder: JSONDecoder<__near_JSONHandler_Array_Array_GameCellData>;
      handledRoot: boolean = false;
      value: Array<Array<wrapped_GameCellData>> = new Array<Array<wrapped_GameCellData>>();
pushObject(name: string): bool {
        this.value.push(<Array<GameCellData>>__near_decode_Array_GameCellData(this.buffer, this.decoder.state));
        return false;
      }
      pushArray(name: string): bool {
        assert(name == null);
        if (!this.handledRoot) {
          this.handledRoot = true;
          return true;
        }
        this.value.push(<Array<GameCellData>>__near_decode_Array_GameCellData(this.buffer, this.decoder.state));
        return false;
      }```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions