private IJsonInput cleanAndParseJsonString(final App app, final String input) throws FrameworkException {

		final Gson gson      = getGson();
		IJsonInput jsonInput = null;

		// isolate input parsing (will include read and write operations)
		try (final Tx tx = app.tx()) {

			jsonInput   = gson.fromJson(input, IJsonInput.class);
			tx.success();

		} catch (JsonSyntaxException jsx) {
			logger.warn("", jsx);
			throw new FrameworkException(400, jsx.getMessage());
		}

		if (jsonInput == null) {

			if (StringUtils.isBlank(input)) {

				try (final Tx tx = app.tx()) {

					jsonInput   = gson.fromJson("{}", IJsonInput.class);
					tx.success();
				}

			} else {

				jsonInput = new JsonSingleInput();
			}
		}

		return jsonInput;

	}
private IJsonInput cleanAndParseJsonString ( final App app , final String input ) throws FrameworkException { final Gson gson = getGson ( ) ; IJsonInput jsonInput = null ; try ( final Tx tx = app . tx ( ) ) { jsonInput = gson . fromJson ( input , IJsonInput . class ) ; tx . success ( ) ; } catch ( JsonSyntaxException jsx ) { logger . warn ( "" , jsx ) ; throw new FrameworkException ( 400 , jsx . getMessage ( ) ) ; } if ( jsonInput == null ) { if ( StringUtils . isBlank ( input ) ) { try ( final Tx tx = app . tx ( ) ) { jsonInput = gson . fromJson ( "{}" , IJsonInput . class ) ; tx . success ( ) ; } } else { jsonInput = new JsonSingleInput ( ) ; } } return jsonInput ; }
----- private methods -----