public static Configuration fromJSON()

in src/main/java/com/awsblog/queueing/config/Configuration.java [47:74]


	public static Configuration fromJSON(String jsonPayload) {

		ObjectMapper mapper = new ObjectMapper();

		//JSON string to Java Object
		Configuration configurationObject = null;
		
		try {
			configurationObject = mapper.readValue(jsonPayload, Configuration.class);
			
			for(ConfigTable tbl : configurationObject.getTables()) {
				configurationObject.getTablesMap().put(tbl.getLogicalName(), tbl);
			}
			
			for(ConfigLambda lamnda : configurationObject.getLambdas()) {
				configurationObject.getLambdasMap().put(lamnda.getLogicalName(), lamnda);
			}
			
		} catch (JsonParseException e) {
			e.printStackTrace();
		} catch (JsonMappingException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}

		return configurationObject;
	}