Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Builders #131

@cdunn2001

Description

@cdunn2001

I'm a fan of the builder pattern. It lets us hide extra classes, e.g. a white-space-compressing writer. How about this API?

// To compress as much as possible.
Json::StreamWriterBuilder b;
b.cs_ = Json::Writer::CommentStyle::None;
b.indentation_ = "";
Json::StreamWriter* w = b.newStreamWriter(&std::cout);
w->write(value);
delete w;

Objections? Suggestions?

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