private static final JsonElement resolvePath(final JsonObject root, String key, JsonElement finalValue){
		// treat all dots as a branch
		String[] segments = key.split("\\.");
		int segmentCount = segments.length;
		
		JsonObject currentProperty = root;
		String currentPath = "";
		
		for(int i = 0; i < segmentCount; i++){
			String segment = segments[i];
			boolean isLastSegment = 1 + i == segmentCount;
			currentPath += segment;
			if(isLastSegment){
				// properties are paths, not objects... so we can be safe knowing the final generated value is always the end of the
				// property path.
				currentProperty.add(segment, finalValue);
			}else if(currentProperty.has(segment)){
				JsonElement nextProperty = currentProperty.get(segment);
				if(nextProperty.isJsonObject()){
					currentPath += ".";
					currentProperty = nextProperty.getAsJsonObject();
				}else{
					LOGGER.debug("duplicate property detected: " + key + "     " + segment + "    " + currentProperty.toString());
					LOGGER.debug("moving " + currentProperty.toString() + " to " + segment + ".value");

					JsonObject jsonObject = new JsonObject();
					jsonObject.add("value", currentProperty.get(segment));
					currentProperty.add(segment, jsonObject);
					
					LOGGER.debug("conflicting property name resolved to: " + currentProperty);
					currentProperty = jsonObject;
				}
				
			}else{
				LOGGER.debug("Creating json namespace: " + currentPath);
				currentPath += ".";
				JsonObject nextProperty = new JsonObject();
				currentProperty.getAsJsonObject().add(segment, nextProperty);
				currentProperty = nextProperty;
			}
			
		}
		
		return root;
	}