Skip to content

Document behavior of to_pretty_string when passing Value #804

Open
@marcospb19

Description

@marcospb19

From https://docs.rs/serde_json/1.0.68/serde_json/fn.to_string_pretty.html:

image

I assume that if I call

use serde_json::*;
to_string_pretty<Value>(...);

I can .unwrap() this result safely, is it right? Or Value's implementation of Serialize might decide to fail?

If it's the former, can I make a PR adding this piece of info to this doc page?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions