Dan Burkert has posted comments on this change.

Change subject: Add json builder utility
......................................................................


Patch Set 1:

(6 comments)

http://gerrit.cloudera.org:8080/#/c/7387/1/src/kudu/util/jsonbuilder.cc
File src/kudu/util/jsonbuilder.cc:

Line 35:     return value_.GetBool();
Use braces around if/else bodies, here and elsewhere.


http://gerrit.cloudera.org:8080/#/c/7387/1/src/kudu/util/jsonbuilder.h
File src/kudu/util/jsonbuilder.h:

Line 1: // Licensed to the Apache Software Foundation (ASF) under one
Should this file be named easy_json.[h,cc]?


Line 17: #ifndef KUDU_UTIL_JSONBUILDER_H_
Use '#pragma once' for new code.


Line 29: // Intended solely for building json objects, not writing/parsing.
If that's the case, then maybe it's best to leave the getters out?  It seems 
problematic that the getters automatically coerce the field values and return 
default values.


Line 71:   EasyJson& SetObject();
In terms of functionality, are these setters providing more than the index 
operators above?


Line 102:   scoped_refptr<EasyJsonAllocator> alloc_;
Prefer std::shared_ptr to scoped_refptr for new code.


-- 
To view, visit http://gerrit.cloudera.org:8080/7387
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie195b06c5ba67af3043d2032c56b90c1a85f641a
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Sam Okrent <[email protected]>
Gerrit-Reviewer: Dan Burkert <[email protected]>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-HasComments: Yes

Reply via email to