private Object getObject ( Class cl , byte [ ] data ) throws Exception { JsonHandler jsonHandler = new JsonDefaultHandler ( ) ; JsonParser jsonParser = new JsonParserImpl ( ) ; InputStream inputStream = new ByteArrayInputStream ( data ) ; jsonParser . parse ( inputStream , jsonHandler ) ; JsonValue jsonValue = jsonHandler . getJsonObject ( ) ; return new BeanBuilder ( ) . createObject ( cl , jsonValue ) ; }
Will be created the Object from JSON binary data .