add support to build zones and PIDs from json

Add support to build zones and PIDs from a json configuration file.

Change-Id: If8608dcd3e084cebabb71fc39851044df4d5d7c2
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/pid/buildjson.hpp b/pid/buildjson.hpp
new file mode 100644
index 0000000..626c982
--- /dev/null
+++ b/pid/buildjson.hpp
@@ -0,0 +1,18 @@
+#pragma once
+
+#include "conf.hpp"
+
+#include <map>
+#include <nlohmann/json.hpp>
+#include <tuple>
+
+using json = nlohmann::json;
+
+/**
+ * Given the json "zones" data, create the map of PIDs and the map of zones.
+ *
+ * @param[in] data - the json data
+ * @return the pidConfig, and the zoneConfig
+ */
+std::pair<std::map<int64_t, PIDConf>, std::map<int64_t, struct ZoneConfig>>
+    buildPIDsFromJson(const json& data);