Skip to content

Adjust types for the encoder to allow null strings #5

Open
@zwade

Description

@zwade

Summary

In order to create top level arrays, or objects, or to place an element in an array, one needs to pass in null for the key. However, with the typing definitions for assemblyscript-json, and the default tsconfig for assemblyscript proper, null is not a valid argument to these functions

Current Solution

For right now, you can use changetype<string>(0) to get around this.

Suggested Solution

It would be nice to have all of the name types to be alternated with null.

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