private static String getJsonVersion(Metadata metadata, ServiceMetadata serviceMetadata) {
        // TODO this should be defaulted in the C2J build tool
        if (serviceMetadata.getJsonVersion() == null && metadata.isJsonProtocol()) {
            return "1.1";
        } else {
            return serviceMetadata.getJsonVersion();
        }
    }
Constructs the metadata that is required for generating the java client from the service meta data.
aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/AddMetadata.java