public String unset_string ( base_resource resrc , String id , options option , String args [ ] , Boolean warning ) throws Exception { String objstr ; String result = "{ " ; if ( ( option != null && option . get_action ( ) != null ) || ( warning != null && warning == true ) ) { result = result + "\"params\":{" ; if ( option != null ) { if ( option . get_action ( ) != null ) { result = result + "\"action\":\"" + option . get_action ( ) + "\"," ; } } if ( warning != null && warning == true ) { result = result + "\"warning\":\"yes\"" ; } result = result + "}," ; } if ( id != null ) result = result + "\"sessionid\":\"" + id + "\"," ; result = result + "\"" + resrc . get_object_type ( ) + "\": {" ; objstr = nitro_util . object_to_string ( resrc ) ; if ( objstr != null ) { result = result + objstr + "," ; } if ( args != null ) { for ( int i = 0 ; i < args . length ; i ++ ) { result = result + "\"" + args [ i ] + "\": true," ; } } result = result + "}," ; result = result + "}" ; return result ; }
Converts nitro resource to Json string . This is exclusively for forming unset string .