Commit Graph

8 Commits

Author SHA1 Message Date
Sage Weil
b08470f0bf configure.ac: link libboost_thread only with json-spirit
Signed-off-by: Sage Weil <sage@redhat.com>
2014-07-27 16:58:08 -07:00
Noah Watkins
8c8be16df7 json_spirit: don't build json_spirit_value.cpp
This file just includes the header that is full of templates and
typedefs, so the resulting object file has no symbols in it and
generates warnings.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-12-30 12:58:37 -08:00
Roald J. van Loon
6949d221ad automake cleanup: implementing non-recursive make
- Enabling subdir objects
- Created a Makefile-env.am with basic automake init
- Created .am files per subdir, included from src/Makefile.am

Signed-off-by: Roald J. van Loon <roaldvanloon@gmail.com>
2013-09-08 00:11:09 +02:00
Sage Weil
6abae35a39 json_spirit: remove unused typedef
In file included from json_spirit/json_spirit_writer.cpp:7:0:
json_spirit/json_spirit_writer_template.h: In function 'String_type json_spirit::non_printable_to_string(unsigned int)':
json_spirit/json_spirit_writer_template.h:37:50: warning: typedef 'Char_type' locally defined but not used [-Wunused-local-typedefs]
         typedef typename String_type::value_type Char_type;

(Also, ha ha, this file uses \r\n.)

Signed-off-by: Sage Weil <sage@inktank.com>
2013-08-20 16:54:05 -07:00
Dan Mick
d9ff7d4a65 mon: add JSON command parsing framework
Use json_spirit to read/parse JSON command input into a "cmdmap",
which is a boost::variant typechecked discriminant union.
This means that requests to read from the map must match the type
given.  Types are string, bool, int64_t, double, and vector<string>,
and that type is a "cmd_vartype"; a cmdmap is a map of name (string) to
cmd_vartype.

Also, an evolutionary deadend hack "build_fullcmd()", which reassembles
certain commands from the cmdmap back into a string for the sole reason
of running them through _allowed_command.  This is due to be replaced by
a better allow mechanism very shortly.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-05-21 15:54:13 -07:00
Yehuda Sadeh
b69da4b8db json_spirit: thread safe
apparently the library is not thread safe by default.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-11-08 13:24:29 -08:00
Yehuda Sadeh
86b06f12a9 json_spirit: update grammar
Support a more relaxed grammar, where last entity in an array
or an object can have a comma trailing.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-10-23 10:43:09 -07:00
Sage Weil
2677c72fde add libjson_spirit.la
This is lightweight and relies on boost spirit, which we already use, so
there are no new dependencies.

There were some other libraries that also looked good, but they weren't
already packages for existing Debian distros like squeeze or even wheezy.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-02-24 11:24:44 -08:00