format
Write the specified String to the underlying document writer as a JSON string. All non-ASCII characters are encoded as Unicode escape sequences, so only ASCII characters will be written.
Parameters
pattern
A patternString (may be null).
args
The arguments to the pattern.
Throws
If an I/O exception occurs.
If an arbitrary value cannot be written.