Skip to content

Parsing from std::string_view #269

Closed
@GoldsteinE

Description

@GoldsteinE

Currently e.g. rfl::json provides two ways to parse a string: from std::string or from std::istream (where the second delegates to the first). That means that parsing from std::string_view currently requires an allocation. yyjson_read() doesn’t take ownership of the passed string, so parsing directly from std::string_view should be possible unless I’m missing something.

I think the same holds for other formats, but I only checked yyjson and pugixml.

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