Add a minireflect based json parser.
This parser takes decent json and parses it into a flatbuffer. The
standard library for flatbuffers needs the full fbs definitions for all
the flatbuffers to do this job.
And add a flatbuffer to JSON function.
Change-Id: Ibc6dcd3fcbd7ac9cf9121d8258d1613d8d20661c
diff --git a/third_party/jsont/BUILD b/third_party/jsont/BUILD
new file mode 100644
index 0000000..dc1d03d
--- /dev/null
+++ b/third_party/jsont/BUILD
@@ -0,0 +1,28 @@
+licenses(["notice"])
+
+cc_library(
+ name = "jsont",
+ srcs = [
+ "jsont.c",
+ ],
+ hdrs = [
+ "jsont.h",
+ ],
+ includes = ["."],
+ visibility = ["//visibility:public"],
+)
+
+cc_test(
+ name = "jsont_test",
+ srcs = ["test/test_tokenizer.c"],
+ copts = [
+ "-Wno-unused-parameter",
+ "-Wno-unused-variable",
+ ] + select({
+ "@//tools:cpu_roborio": [
+ "-Wno-unused-but-set-variable",
+ ],
+ "//conditions:default": [],
+ }),
+ deps = [":jsont"],
+)