thrifty-runtime/src/main/java/com/microsoft/thrifty/protocol/JsonProtocol.java
private void writeJsonInteger(long num) throws IOException {
        context.write();
        String str = Long.toString(num);
        boolean escapeNum = context.escapeNum();
        if (escapeNum) {
            transport.write(QUOTE);
        }
        try {
            byte[] buf = str.getBytes("UTF-8");
            transport.write(buf);
        } catch (UnsupportedEncodingException e) {
            throw new AssertionError(e);
        }
        if (escapeNum) {
            transport.write(QUOTE);
        }
    }
private void writeJsonInteger(long num) throws IOException {
        context.write();
        String str = Long.toString(num);
        boolean escapeNum = context.escapeNum();
        if (escapeNum) {
            transport.write(QUOTE);
        }
        try {
            byte[] buf = str.getBytes("UTF-8");
            transport.write(buf);
        } catch (UnsupportedEncodingException e) {
            throw new AssertionError(e);
        }
        if (escapeNum) {
            transport.write(QUOTE);
        }
    }
private void writeJsonInteger ( long num ) throws IOException { context . write ( ) ; String str = Long . toString ( num ) ; boolean escapeNum = context . escapeNum ( ) ; if ( escapeNum ) { transport . write ( QUOTE ) ; } try { byte [ ] buf = str . getBytes ( "UTF-8" ) ; transport . write ( buf ) ; } catch ( UnsupportedEncodingException e ) { throw new AssertionError ( e ) ; } if ( escapeNum ) { transport . write ( QUOTE ) ; } }
wrapped in quotes to output as a Json string.
wrapped in quotes to output as a Json string .