@ SuppressWarnings ( "unchecked" ) public JSONNavi < T > object ( ) { if ( failure ) return this ; if ( current == null && readonly ) failure ( "Can not create Object child in readonly" , null ) ; if ( current != null ) { if ( isObject ( ) ) return this ; if ( isArray ( ) ) failure ( "can not use Object feature on Array." , null ) ; failure ( "Can not use current possition as Object" , null ) ; } else { current = mapper . createObject ( ) ; } if ( root == null ) root = ( T ) current ; else store ( ) ; return this ; }
Set current value as Json Object You can also skip this call Objects can be create automatically .