Skip to content

Allow using hs.json.encode on non-table types #3729

@SilverEzhik

Description

@SilverEzhik

hs.json.encode can currently only encode tables - it would be nice to have this extended to support all other JSON types - booleans, numbers, strings, null.

NSJSONSerialization can write non-array/non-dictionary objects with NSJSONWritingFragmentsAllowed: https://developer.apple.com/documentation/foundation/nsjsonwritingoptions/nsjsonwritingfragmentsallowed

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