question: JSONStringer close ( Scope empty , Scope nonempty , String closeBracket ) throws JSONException { Scope context = peek ( ) ; if ( context != nonempty && context != empty ) { throw new JSONException ( "Nesting problem" ) ; } stack . remove ( stack . size ( ) - 1 ) ; if ( context == nonempty ) { newline ( ) ; } out . append ( closeBracket ) ; return this ; }
target:  Closes the current scope by appending any necessary whitespace and the given bracket.