Browse Source

Switching to a more conventional format of directories.

Sam Jaffe 7 years ago
parent
commit
5dad151643

+ 0 - 4
example.json

@@ -1,4 +0,0 @@
-{
-  "t":{"a":1,"b":-2},
-  "d":1.5
-}

json/json_binder_discard.hpp → include/json/binder/json_binder_discard.hpp


json/json_binder_parser.hpp → include/json/binder/json_binder_parser.hpp


json/json_direct_binder.hpp → include/json/binder/json_direct_binder.hpp


json/json_direct_get_binder.hpp → include/json/binder/json_direct_get_binder.hpp


json/json_direct_map_binder.hpp → include/json/binder/json_direct_map_binder.hpp


json/json_direct_scalar_binder.hpp → include/json/binder/json_direct_scalar_binder.hpp


json/json_direct_vector_binder.hpp → include/json/binder/json_direct_vector_binder.hpp


json/json_object_binder.hpp → include/json/binder/json_object_binder.hpp


json/json_pointer_binder.hpp → include/json/binder/json_pointer_binder.hpp


json/json_polymorphic_binder.hpp → include/json/binder/json_polymorphic_binder.hpp


json/json_tuple_binder.hpp → include/json/binder/json_tuple_binder.hpp


json.hpp → include/json/json.hpp


+ 10 - 10
json_binder.hpp

@@ -98,15 +98,15 @@ namespace json {
   }
 }
 
-#include "json/json_binder_parser.hpp"
-#include "json/json_direct_binder.hpp"
-#include "json/json_tuple_binder.hpp"
-#include "json/json_object_binder.hpp"
-#include "json/json_direct_get_binder.hpp"
-#include "json/json_direct_map_binder.hpp"
-#include "json/json_direct_scalar_binder.hpp"
-#include "json/json_direct_vector_binder.hpp"
-#include "json/json_pointer_binder.hpp"
-#include "json/json_polymorphic_binder.hpp"
+#include "binder/json_binder_parser.hpp"
+#include "binder/json_direct_binder.hpp"
+#include "binder/json_tuple_binder.hpp"
+#include "binder/json_object_binder.hpp"
+#include "binder/json_direct_get_binder.hpp"
+#include "binder/json_direct_map_binder.hpp"
+#include "binder/json_direct_scalar_binder.hpp"
+#include "binder/json_direct_vector_binder.hpp"
+#include "binder/json_pointer_binder.hpp"
+#include "binder/json_polymorphic_binder.hpp"
 
 #endif /* json_binder_h */

json_common.hpp → include/json/json_common.hpp


+ 24 - 121
json.xcodeproj/project.pbxproj

@@ -7,39 +7,18 @@
 	objects = {
 
 /* Begin PBXBuildFile section */
+		CD1AD69E219F7CFF00AB8959 /* json in Headers */ = {isa = PBXBuildFile; fileRef = CD1AD69D219F7CFF00AB8959 /* json */; settings = {ATTRIBUTES = (Public, ); }; };
 		CD3C80C61D6A711000ACC795 /* json_binder_discard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD17473E1D4C1DFD000C344B /* json_binder_discard.cpp */; };
 		CD3C80C71D6A711000ACC795 /* json_common.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD472C751CCC1ABD0084C8D6 /* json_common.cpp */; };
-		CD3C80CA1D6A711000ACC795 /* json.hpp in Headers */ = {isa = PBXBuildFile; fileRef = CDB2F7421C5D48090067C2EC /* json.hpp */; };
-		CD3C80CB1D6A711000ACC795 /* json_binder_discard.hpp in Headers */ = {isa = PBXBuildFile; fileRef = CD17473F1D4C1DFD000C344B /* json_binder_discard.hpp */; };
-		CD3C80D31D6A728000ACC795 /* json_binder.hpp in Headers */ = {isa = PBXBuildFile; fileRef = CDB2F7461C5EA2E80067C2EC /* json_binder.hpp */; settings = {ATTRIBUTES = (Public, ); }; };
-		CD3C80DB1D6A728A00ACC795 /* json_binder_parser.hpp in Headers */ = {isa = PBXBuildFile; fileRef = CDB2F7451C5E9BEB0067C2EC /* json_binder_parser.hpp */; };
-		CD3C80DC1D6A728A00ACC795 /* json_tuple_binder.hpp in Headers */ = {isa = PBXBuildFile; fileRef = CD472C791CCC1CD80084C8D6 /* json_tuple_binder.hpp */; };
-		CD3C80DD1D6A728A00ACC795 /* json_object_binder.hpp in Headers */ = {isa = PBXBuildFile; fileRef = CD472C7A1CCC1D440084C8D6 /* json_object_binder.hpp */; };
-		CD3C80DE1D6A728A00ACC795 /* json_direct_binder.hpp in Headers */ = {isa = PBXBuildFile; fileRef = CD472C7E1CCC498C0084C8D6 /* json_direct_binder.hpp */; };
-		CD3C80DF1D6A728A00ACC795 /* json_direct_map_binder.hpp in Headers */ = {isa = PBXBuildFile; fileRef = CD472C7B1CCC1DA20084C8D6 /* json_direct_map_binder.hpp */; };
-		CD3C80E01D6A728A00ACC795 /* json_direct_scalar_binder.hpp in Headers */ = {isa = PBXBuildFile; fileRef = CD472C7D1CCC1E120084C8D6 /* json_direct_scalar_binder.hpp */; };
-		CD3C80E11D6A728A00ACC795 /* json_direct_vector_binder.hpp in Headers */ = {isa = PBXBuildFile; fileRef = CD472C7C1CCC1DDF0084C8D6 /* json_direct_vector_binder.hpp */; };
 		CD472C761CCC1ABD0084C8D6 /* json_common.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD472C751CCC1ABD0084C8D6 /* json_common.cpp */; };
 		CD472C801CCDA4B00084C8D6 /* json_parser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD472C7F1CCDA4B00084C8D6 /* json_parser.cpp */; };
 		CD679D7A1E6126CA00F9F843 /* json_tc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD679D781E6126C700F9F843 /* json_tc.cpp */; };
 		CDB2F7431C5D48090067C2EC /* json.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDB2F7411C5D48090067C2EC /* json.cpp */; };
-		CDB2F7441C5D48090067C2EC /* json.hpp in Headers */ = {isa = PBXBuildFile; fileRef = CDB2F7421C5D48090067C2EC /* json.hpp */; };
 		CDE6CC0E1EF9E977005E745A /* json_binder_discard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD17473E1D4C1DFD000C344B /* json_binder_discard.cpp */; };
 		CDE6CC0F1EF9E977005E745A /* json_common.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD472C751CCC1ABD0084C8D6 /* json_common.cpp */; };
-		CDE6CC121EF9E977005E745A /* json_object_binder.hpp in Headers */ = {isa = PBXBuildFile; fileRef = CD472C7A1CCC1D440084C8D6 /* json_object_binder.hpp */; };
-		CDE6CC131EF9E977005E745A /* json_direct_scalar_binder.hpp in Headers */ = {isa = PBXBuildFile; fileRef = CD472C7D1CCC1E120084C8D6 /* json_direct_scalar_binder.hpp */; };
-		CDE6CC141EF9E977005E745A /* json.hpp in Headers */ = {isa = PBXBuildFile; fileRef = CDB2F7421C5D48090067C2EC /* json.hpp */; };
-		CDE6CC151EF9E977005E745A /* json_direct_binder.hpp in Headers */ = {isa = PBXBuildFile; fileRef = CD472C7E1CCC498C0084C8D6 /* json_direct_binder.hpp */; };
-		CDE6CC161EF9E977005E745A /* json_binder_parser.hpp in Headers */ = {isa = PBXBuildFile; fileRef = CDB2F7451C5E9BEB0067C2EC /* json_binder_parser.hpp */; };
-		CDE6CC171EF9E977005E745A /* json_tuple_binder.hpp in Headers */ = {isa = PBXBuildFile; fileRef = CD472C791CCC1CD80084C8D6 /* json_tuple_binder.hpp */; };
-		CDE6CC181EF9E977005E745A /* json_direct_vector_binder.hpp in Headers */ = {isa = PBXBuildFile; fileRef = CD472C7C1CCC1DDF0084C8D6 /* json_direct_vector_binder.hpp */; };
-		CDE6CC191EF9E977005E745A /* json_direct_map_binder.hpp in Headers */ = {isa = PBXBuildFile; fileRef = CD472C7B1CCC1DA20084C8D6 /* json_direct_map_binder.hpp */; };
-		CDE6CC1A1EF9E977005E745A /* json_binder.hpp in Headers */ = {isa = PBXBuildFile; fileRef = CDB2F7461C5EA2E80067C2EC /* json_binder.hpp */; settings = {ATTRIBUTES = (Public, ); }; };
-		CDE6CC1B1EF9E977005E745A /* json_binder_discard.hpp in Headers */ = {isa = PBXBuildFile; fileRef = CD17473F1D4C1DFD000C344B /* json_binder_discard.hpp */; };
 		CDE6CC221EF9E984005E745A /* json_parser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD472C7F1CCDA4B00084C8D6 /* json_parser.cpp */; };
 		CDE6CC231EF9E984005E745A /* json.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDB2F7411C5D48090067C2EC /* json.cpp */; };
 		CDE6CC241EF9E984005E745A /* json_common.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD472C751CCC1ABD0084C8D6 /* json_common.cpp */; };
-		CDE6CC271EF9E984005E745A /* json.hpp in Headers */ = {isa = PBXBuildFile; fileRef = CDB2F7421C5D48090067C2EC /* json.hpp */; };
 		CDE6CC2C1EF9E994005E745A /* libjson_s.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CDE6CC2B1EF9E984005E745A /* libjson_s.a */; };
 		CDE6CC2D1EF9E994005E745A /* libjson-direct_s.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CDE6CC1F1EF9E977005E745A /* libjson-direct_s.a */; };
 /* End PBXBuildFile section */
@@ -58,24 +37,12 @@
 
 /* Begin PBXFileReference section */
 		CD17473E1D4C1DFD000C344B /* json_binder_discard.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = json_binder_discard.cpp; sourceTree = "<group>"; };
-		CD17473F1D4C1DFD000C344B /* json_binder_discard.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = json_binder_discard.hpp; sourceTree = "<group>"; };
-		CD1747431D4C216B000C344B /* example.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = example.json; sourceTree = "<group>"; };
-		CD1AD696219E60DC00AB8959 /* json_pointer_binder.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = json_pointer_binder.hpp; sourceTree = "<group>"; };
-		CD1AD697219E615700AB8959 /* json_polymorphic_binder.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = json_polymorphic_binder.hpp; sourceTree = "<group>"; };
-		CD217D8F1CCAD587007C50C6 /* json_test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = json_test.cpp; sourceTree = "<group>"; };
-		CD217D921CCAD885007C50C6 /* json_common.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = json_common.hpp; sourceTree = "<group>"; };
+		CD1AD69D219F7CFF00AB8959 /* json */ = {isa = PBXFileReference; lastKnownFileType = folder; name = json; path = include/json; sourceTree = "<group>"; };
 		CD2B09881E6374F300D6D23A /* json_binder_terminate.t.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = json_binder_terminate.t.h; sourceTree = "<group>"; };
-		CD2B098A1E63822100D6D23A /* json_direct_get_binder.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = json_direct_get_binder.hpp; sourceTree = "<group>"; };
 		CD2B098B1E63839A00D6D23A /* json_binder_tuple.t.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = json_binder_tuple.t.h; sourceTree = "<group>"; };
 		CD31E1E9219CE85A001C2AF1 /* json_binder_polymorphic.t.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; path = json_binder_polymorphic.t.h; sourceTree = "<group>"; };
 		CD3C80CF1D6A711000ACC795 /* libjson-direct.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libjson-direct.dylib"; sourceTree = BUILT_PRODUCTS_DIR; };
 		CD472C751CCC1ABD0084C8D6 /* json_common.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = json_common.cpp; sourceTree = "<group>"; };
-		CD472C791CCC1CD80084C8D6 /* json_tuple_binder.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = json_tuple_binder.hpp; sourceTree = "<group>"; };
-		CD472C7A1CCC1D440084C8D6 /* json_object_binder.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = json_object_binder.hpp; sourceTree = "<group>"; };
-		CD472C7B1CCC1DA20084C8D6 /* json_direct_map_binder.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = json_direct_map_binder.hpp; sourceTree = "<group>"; };
-		CD472C7C1CCC1DDF0084C8D6 /* json_direct_vector_binder.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = json_direct_vector_binder.hpp; sourceTree = "<group>"; };
-		CD472C7D1CCC1E120084C8D6 /* json_direct_scalar_binder.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = json_direct_scalar_binder.hpp; sourceTree = "<group>"; };
-		CD472C7E1CCC498C0084C8D6 /* json_direct_binder.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = json_direct_binder.hpp; sourceTree = "<group>"; };
 		CD472C7F1CCDA4B00084C8D6 /* json_parser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = json_parser.cpp; sourceTree = "<group>"; };
 		CD679D761E61267300F9F843 /* json_binder_value_int.t.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = json_binder_value_int.t.h; sourceTree = "<group>"; };
 		CD679D781E6126C700F9F843 /* json_tc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = json_tc.cpp; sourceTree = "<group>"; };
@@ -84,9 +51,6 @@
 		CD84C4EB1F68908F002014D3 /* json_binder_custom.t.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.h; path = json_binder_custom.t.h; sourceTree = "<group>"; tabWidth = 2; };
 		CDB2F7331C5D47F70067C2EC /* libjson.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libjson.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
 		CDB2F7411C5D48090067C2EC /* json.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = json.cpp; sourceTree = "<group>"; tabWidth = 2; };
-		CDB2F7421C5D48090067C2EC /* json.hpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.h; path = json.hpp; sourceTree = "<group>"; tabWidth = 2; };
-		CDB2F7451C5E9BEB0067C2EC /* json_binder_parser.hpp */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.cpp.h; path = json_binder_parser.hpp; sourceTree = "<group>"; tabWidth = 2; };
-		CDB2F7461C5EA2E80067C2EC /* json_binder.hpp */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.cpp.h; path = json_binder.hpp; sourceTree = SOURCE_ROOT; tabWidth = 2; };
 		CDE6CC1F1EF9E977005E745A /* libjson-direct_s.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libjson-direct_s.a"; sourceTree = BUILT_PRODUCTS_DIR; };
 		CDE6CC2B1EF9E984005E745A /* libjson_s.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libjson_s.a; sourceTree = BUILT_PRODUCTS_DIR; };
 		CDECC7D41E64E6A900BEE842 /* json_binder_collection.t.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = json_binder_collection.t.h; sourceTree = "<group>"; };
@@ -136,54 +100,15 @@
 /* End PBXFrameworksBuildPhase section */
 
 /* Begin PBXGroup section */
-		CD472C781CCC1CB00084C8D6 /* impl */ = {
-			isa = PBXGroup;
-			children = (
-				CD17473E1D4C1DFD000C344B /* json_binder_discard.cpp */,
-				CD17473F1D4C1DFD000C344B /* json_binder_discard.hpp */,
-				CDB2F7451C5E9BEB0067C2EC /* json_binder_parser.hpp */,
-				CD472C791CCC1CD80084C8D6 /* json_tuple_binder.hpp */,
-				CD472C7A1CCC1D440084C8D6 /* json_object_binder.hpp */,
-				CD472C7E1CCC498C0084C8D6 /* json_direct_binder.hpp */,
-				CD2B098A1E63822100D6D23A /* json_direct_get_binder.hpp */,
-				CD472C7B1CCC1DA20084C8D6 /* json_direct_map_binder.hpp */,
-				CD472C7D1CCC1E120084C8D6 /* json_direct_scalar_binder.hpp */,
-				CD472C7C1CCC1DDF0084C8D6 /* json_direct_vector_binder.hpp */,
-				CD1AD696219E60DC00AB8959 /* json_pointer_binder.hpp */,
-				CD1AD697219E615700AB8959 /* json_polymorphic_binder.hpp */,
-			);
-			name = impl;
-			sourceTree = "<group>";
-		};
-		CD472C821CCDA5830084C8D6 /* binder */ = {
-			isa = PBXGroup;
-			children = (
-				CDB2F7461C5EA2E80067C2EC /* json_binder.hpp */,
-				CD472C781CCC1CB00084C8D6 /* impl */,
-			);
-			name = binder;
-			path = json;
-			sourceTree = "<group>";
-		};
-		CD472C831CCDA5990084C8D6 /* json */ = {
+		CD1AD69A219F7A2F00AB8959 /* src */ = {
 			isa = PBXGroup;
 			children = (
+				CD472C751CCC1ABD0084C8D6 /* json_common.cpp */,
 				CDB2F7411C5D48090067C2EC /* json.cpp */,
-				CDB2F7421C5D48090067C2EC /* json.hpp */,
 				CD472C7F1CCDA4B00084C8D6 /* json_parser.cpp */,
+				CD17473E1D4C1DFD000C344B /* json_binder_discard.cpp */,
 			);
-			name = json;
-			sourceTree = "<group>";
-		};
-		CD679D741E61265F00F9F843 /* src */ = {
-			isa = PBXGroup;
-			children = (
-				CD217D921CCAD885007C50C6 /* json_common.hpp */,
-				CD472C751CCC1ABD0084C8D6 /* json_common.cpp */,
-				CD472C831CCDA5990084C8D6 /* json */,
-				CD472C821CCDA5830084C8D6 /* binder */,
-			);
-			name = src;
+			path = src;
 			sourceTree = "<group>";
 		};
 		CD679D751E61266300F9F843 /* test */ = {
@@ -201,15 +126,14 @@
 				CD31E1E9219CE85A001C2AF1 /* json_binder_polymorphic.t.h */,
 				CD679D781E6126C700F9F843 /* json_tc.cpp */,
 			);
-			name = test;
+			path = test;
 			sourceTree = "<group>";
 		};
 		CDB2F72A1C5D47F70067C2EC = {
 			isa = PBXGroup;
 			children = (
-				CD1747431D4C216B000C344B /* example.json */,
-				CD217D8F1CCAD587007C50C6 /* json_test.cpp */,
-				CD679D741E61265F00F9F843 /* src */,
+				CD1AD69D219F7CFF00AB8959 /* json */,
+				CD1AD69A219F7A2F00AB8959 /* src */,
 				CD679D751E61266300F9F843 /* test */,
 				CDB2F7341C5D47F70067C2EC /* Products */,
 			);
@@ -234,16 +158,7 @@
 			isa = PBXHeadersBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				CD3C80DD1D6A728A00ACC795 /* json_object_binder.hpp in Headers */,
-				CD3C80E01D6A728A00ACC795 /* json_direct_scalar_binder.hpp in Headers */,
-				CD3C80CA1D6A711000ACC795 /* json.hpp in Headers */,
-				CD3C80DE1D6A728A00ACC795 /* json_direct_binder.hpp in Headers */,
-				CD3C80DB1D6A728A00ACC795 /* json_binder_parser.hpp in Headers */,
-				CD3C80DC1D6A728A00ACC795 /* json_tuple_binder.hpp in Headers */,
-				CD3C80E11D6A728A00ACC795 /* json_direct_vector_binder.hpp in Headers */,
-				CD3C80DF1D6A728A00ACC795 /* json_direct_map_binder.hpp in Headers */,
-				CD3C80D31D6A728000ACC795 /* json_binder.hpp in Headers */,
-				CD3C80CB1D6A711000ACC795 /* json_binder_discard.hpp in Headers */,
+				CD1AD69E219F7CFF00AB8959 /* json in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -251,7 +166,6 @@
 			isa = PBXHeadersBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				CDB2F7441C5D48090067C2EC /* json.hpp in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -259,16 +173,6 @@
 			isa = PBXHeadersBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				CDE6CC121EF9E977005E745A /* json_object_binder.hpp in Headers */,
-				CDE6CC131EF9E977005E745A /* json_direct_scalar_binder.hpp in Headers */,
-				CDE6CC141EF9E977005E745A /* json.hpp in Headers */,
-				CDE6CC151EF9E977005E745A /* json_direct_binder.hpp in Headers */,
-				CDE6CC161EF9E977005E745A /* json_binder_parser.hpp in Headers */,
-				CDE6CC171EF9E977005E745A /* json_tuple_binder.hpp in Headers */,
-				CDE6CC181EF9E977005E745A /* json_direct_vector_binder.hpp in Headers */,
-				CDE6CC191EF9E977005E745A /* json_direct_map_binder.hpp in Headers */,
-				CDE6CC1A1EF9E977005E745A /* json_binder.hpp in Headers */,
-				CDE6CC1B1EF9E977005E745A /* json_binder_discard.hpp in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -276,7 +180,6 @@
 			isa = PBXHeadersBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				CDE6CC271EF9E984005E745A /* json.hpp in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -414,23 +317,23 @@
 			files = (
 			);
 			inputPaths = (
-				"$(SRCROOT)/json_binder_value_int.t.h",
-				"$(SRCROOT)/json_binder_value_string.t.h",
-				"$(SRCROOT)/json_binder_value_double.t.h",
-				"$(SRCROOT)/json_binder_terminate.t.h",
-				"$(SRCROOT)/json_binder_tuple.t.h",
-				"$(SRCROOT)/json_binder_collection.t.h",
-				"$(SRCROOT)/json_binder_test_bool.t.h",
-				"$(SRCROOT)/json_binder_object.t.h",
-				"$(SRCROOT)/json_binder_custom.t.h",
-				"$(SRCROOT)/json_binder_polymorphic.t.h",
+				"$(SRCROOT)/test/json_binder_value_int.t.h",
+				"$(SRCROOT)/test/json_binder_value_string.t.h",
+				"$(SRCROOT)/test/json_binder_value_double.t.h",
+				"$(SRCROOT)/test/json_binder_terminate.t.h",
+				"$(SRCROOT)/test/json_binder_tuple.t.h",
+				"$(SRCROOT)/test/json_binder_collection.t.h",
+				"$(SRCROOT)/test/json_binder_test_bool.t.h",
+				"$(SRCROOT)/test/json_binder_object.t.h",
+				"$(SRCROOT)/test/json_binder_custom.t.h",
+				"$(SRCROOT)/test/json_binder_polymorphic.t.h",
 			);
 			outputPaths = (
-				"$(SRCDIR)/json_tc.cpp",
+				"$(SRCDIR)/test/json_tc.cpp",
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
-			shellScript = "cxxtestgen --error-printer -o json_tc.cpp json_binder_value_int.t.h json_binder_value_string.t.h json_binder_value_double.t.h json_binder_terminate.t.h json_binder_tuple.t.h json_binder_collection.t.h json_binder_test_bool.t.h json_binder_object.t.h json_binder_custom.t.h json_binder_polymorphic.t.h\n";
+			shellScript = "cd test\ncxxtestgen --error-printer -o json_tc.cpp \\\n    json_binder_value_int.t.h json_binder_value_string.t.h \\\n    json_binder_value_double.t.h json_binder_terminate.t.h \\\n    json_binder_tuple.t.h json_binder_collection.t.h \\\n    json_binder_test_bool.t.h json_binder_object.t.h \\\n    json_binder_custom.t.h json_binder_polymorphic.t.h\n";
 		};
 /* End PBXShellScriptBuildPhase section */
 
@@ -494,7 +397,6 @@
 				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_SYMBOLS_PRIVATE_EXTERN = YES;
 				PRODUCT_NAME = "$(TARGET_NAME)";
-				USER_HEADER_SEARCH_PATHS = "../**";
 			};
 			name = Debug;
 		};
@@ -508,7 +410,6 @@
 				GCC_ENABLE_CPP_RTTI = YES;
 				GCC_SYMBOLS_PRIVATE_EXTERN = YES;
 				PRODUCT_NAME = "$(TARGET_NAME)";
-				USER_HEADER_SEARCH_PATHS = "../**";
 			};
 			name = Release;
 		};
@@ -562,6 +463,7 @@
 				MTL_ENABLE_DEBUG_INFO = YES;
 				ONLY_ACTIVE_ARCH = YES;
 				SDKROOT = macosx;
+				USER_HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/include/";
 			};
 			name = Debug;
 		};
@@ -608,6 +510,7 @@
 				MACOSX_DEPLOYMENT_TARGET = 10.10;
 				MTL_ENABLE_DEBUG_INFO = NO;
 				SDKROOT = macosx;
+				USER_HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/include/";
 			};
 			name = Release;
 		};

+ 1 - 1
json.xcodeproj/xcuserdata/samjaffe.xcuserdatad/xcschemes/xcschememanagement.plist

@@ -7,7 +7,7 @@
 		<key>json-direct.xcscheme</key>
 		<dict>
 			<key>isShown</key>
-			<false/>
+			<true/>
 			<key>orderHint</key>
 			<integer>8</integer>
 		</dict>

+ 0 - 54
json_test.cpp

@@ -1,54 +0,0 @@
-//
-//  json_test.cpp
-//  json
-//
-//  Created by Sam Jaffe on 4/22/16.
-//
-
-#include "json_binder.hpp"
-
-#include <fstream>
-
-struct test_t {
-  int a, b;
-};
-
-struct test_2_t {
-  test_t t;
-  double d;
-};
-
-int main(int argc, char const** argv) {
-  auto bind1 = json::binder::object_binder<test_t>{}
-  ("a", &test_t::a)
-  ("b", &test_t::b);
-  
-  json::binder::tuple_binder<test_t>{}
-  (&test_t::a)
-  (&test_t::b);
-  
-  auto bind2 = json::binder::object_binder<test_2_t>{}
-  ("t", &test_2_t::t, bind1)("d", &test_2_t::d);
-  
-  {
-    test_t out{};
-    std::string data = "{\"a\":1,\"b\":2,\"c\":3}";
-    
-    json::parser::parse(json::binder::bind(out, bind1), data);
-    std::cout << out.a << ',' << out.b << std::endl;
-  }
-  {
-    test_2_t out{};
-    std::string data = "{\"t\":{\"a\":1,\"b\":2},\"d\":1.5}";
-    std::cout << data << std::endl;
-
-    std::ifstream file("/Users/samjaffe/Documents/Programming/XTools/misc/json/example.json");
-    json::parser::parse(json::binder::bind(out, bind2), file);
-    std::cout << '{' << out.t.a << ',' << out.t.b << "}," << out.d << std::endl;
-    
-    std::string sout;
-    json::parser::write(json::binder::bind(out, bind2), sout);
-    std::cout << sout << std::endl;
-  }
-  
-}

json.cpp → src/json.cpp


+ 2 - 2
json/json_binder_discard.cpp

@@ -5,9 +5,9 @@
 //  Created by Sam Jaffe on 7/29/16.
 //
 
-#include "json_common.hpp"
+#include "json/json_common.hpp"
 
-#include "json_binder_discard.hpp"
+#include "json/binder/json_binder_discard.hpp"
 
 #include <cstring>
 

+ 1 - 1
json_common.cpp

@@ -5,7 +5,7 @@
 //  Created by Sam Jaffe on 4/23/16.
 //
 
-#include "json_common.hpp"
+#include "json/json_common.hpp"
 
 #include <cstring>
 #include <map>

json_parser.cpp → src/json_parser.cpp


+ 1 - 1
json_binder_collection.t.h

@@ -8,7 +8,7 @@
 #pragma once
 
 #include <cxxtest/TestSuite.h>
-#include "json_binder.hpp"
+#include "json/json_binder.hpp"
 
 using namespace json::binder;
 using namespace json::parser;

+ 1 - 1
json_binder_custom.t.h

@@ -8,7 +8,7 @@
 #pragma once
 
 #include <cxxtest/TestSuite.h>
-#include "json_binder.hpp"
+#include "json/json_binder.hpp"
 
 #include <iomanip>
 

+ 1 - 1
json_binder_object.t.h

@@ -8,7 +8,7 @@
 #pragma once
 
 #include <cxxtest/TestSuite.h>
-#include "json_binder.hpp"
+#include "json/json_binder.hpp"
 
 using namespace json::binder;
 using namespace json::parser;

+ 1 - 1
json_binder_polymorphic.t.h

@@ -9,7 +9,7 @@
 #pragma once
 
 #include <cxxtest/TestSuite.h>
-#include "json_binder.hpp"
+#include "json/json_binder.hpp"
 
 struct Base {
   virtual ~Base() = default;

+ 2 - 2
json_binder_terminate.t.h

@@ -8,7 +8,7 @@
 #pragma once
 
 #include <cxxtest/TestSuite.h>
-#include "json_binder.hpp"
+#include "json/json_binder.hpp"
 
 using namespace json::binder;
 using namespace json::parser;
@@ -65,4 +65,4 @@ public:
                            disable_concatenated_json_bodies),
                      json::malformed_json_exception);
   }
-};
+};

+ 1 - 1
json_binder_test_bool.t.h

@@ -8,7 +8,7 @@
 #pragma once
 
 #include <cxxtest/TestSuite.h>
-#include "json_binder.hpp"
+#include "json/json_binder.hpp"
 
 using namespace json::binder;
 using namespace json::parser;

+ 1 - 1
json_binder_tuple.t.h

@@ -8,7 +8,7 @@
 #pragma once
 
 #include <cxxtest/TestSuite.h>
-#include "json_binder.hpp"
+#include "json/json_binder.hpp"
 
 using namespace json::binder;
 using namespace json::parser;

+ 1 - 1
json_binder_value_double.t.h

@@ -8,7 +8,7 @@
 #pragma once
 
 #include <cxxtest/TestSuite.h>
-#include "json_binder.hpp"
+#include "json/json_binder.hpp"
 
 using namespace json::binder;
 using namespace json::parser;

+ 1 - 1
json_binder_value_int.t.h

@@ -8,7 +8,7 @@
 #pragma once
 
 #include <cxxtest/TestSuite.h>
-#include "json_binder.hpp"
+#include "json/json_binder.hpp"
 
 using namespace json::binder;
 using namespace json::parser;

+ 1 - 1
json_binder_value_string.t.h

@@ -8,7 +8,7 @@
 
 #include <cxxtest/TestSuite.h>
 
-#include "json_binder.hpp"
+#include "json/json_binder.hpp"
 
 using namespace json::binder;
 using namespace json::parser;