public AutoBuffer writeUnwrappedJSON ( AutoBuffer ab ) { if ( is_array ) { if ( t . equals ( "B" ) ) return ab . putJSONA4 ( i_ar ) ; // NOTE: upcast else if ( t . equals ( "I" ) ) return ab . putJSONA4 ( i_ar ) ; else if ( t . equals ( "L" ) ) return ab . putJSONA8 ( l_ar ) ; else if ( t . equals ( "F" ) ) return ab . putJSONA4f ( f_ar ) ; else if ( t . equals ( "D" ) ) return ab . putJSONA8d ( d_ar ) ; else if ( t . equals ( "Bo" ) ) return ab . putJSONAStr ( null ) ; // TODO: BROKEN else if ( t . equals ( "S" ) ) return ab . putJSONAStr ( s_ar ) ; else if ( t . equals ( "E" ) ) return ab . putJSONAStr ( e_ar ) ; else if ( t . equals ( "K" ) ) return ab . putJSONA ( k_ar ) ; else if ( t . equals ( "Iced" ) ) return ab . putJSONA ( iced_ar ) ; } else { if ( t . equals ( "B" ) ) return ab . putJSON1 ( ( byte ) i ) ; else if ( t . equals ( "I" ) ) return ab . putJSON4 ( i ) ; else if ( t . equals ( "L" ) ) return ab . putJSON8 ( l ) ; else if ( t . equals ( "F" ) ) return ab . putJSON4f ( f ) ; else if ( t . equals ( "D" ) ) return ab . putJSON8d ( d ) ; else if ( t . equals ( "Bo" ) ) return ab . putJSONStrUnquoted ( b ? "true" : "false" ) ; else if ( t . equals ( "S" ) ) return ab . putJSONName ( s ) ; else if ( t . equals ( "E" ) ) return ab . putJSONName ( e ) ; else if ( t . equals ( "K" ) ) return ab . putJSON ( k ) ; } throw H2O . fail ( "Unhandled type: " + t ) ; // TODO: arrays }
Write JSON for the wrapped value without putting it inside a JSON object .