public HppRequest requestFromJson(String json, boolean encoded) {

		LOGGER.info("Converting JSON to HppRequest.");

		//convert to HppRequest from JSON
		HppRequest hppRequest = JsonUtils.fromJsonHppRequest(json);

		//decode if necessary
		if (encoded) {
			LOGGER.debug("Decoding object.");
			try {
				hppRequest = hppRequest.decode(ENCODING_CHARSET);
			} catch (UnsupportedEncodingException ex) {
				LOGGER.error("Exception encoding HPP request.", ex);
				throw new RealexException("Exception decoding HPP request.", ex);
			}
		}

		//validate HPP request 
		LOGGER.debug("Validating request.");
		ValidationUtils.validate(hppRequest);

		return hppRequest;
	}
public HppRequest requestFromJson ( String json , boolean encoded ) { LOGGER . info ( "Converting JSON to HppRequest." ) ; HppRequest hppRequest = JsonUtils . fromJsonHppRequest ( json ) ; if ( encoded ) { LOGGER . debug ( "Decoding object." ) ; try { hppRequest = hppRequest . decode ( ENCODING_CHARSET ) ; } catch ( UnsupportedEncodingException ex ) { LOGGER . error ( "Exception encoding HPP request." , ex ) ; throw new RealexException ( "Exception decoding HPP request." , ex ) ; } } LOGGER . debug ( "Validating request." ) ; ValidationUtils . validate ( hppRequest ) ; return hppRequest ; }
<p>
Method produces <code>HppRequest</code> object from JSON.
Carries out the following actions:
<ul>
<li>Deserialises JSON to request object</li>
<li>Decodes Base64 inputs</li>
<li>Validates inputs</li>
</ul>
</p>

@param json
@param encoded <code>true</code> if the JSON values have been encoded.
@return HppRequest