Code example for JSONStringer

Methods: toString

0
        public static final String ACCURACY = "accuracy";
 
        public static final String TOTAL_DISTANCE = "totalDistance";
 
        public static final String convertAll(Cursor c) {
            JSONStringer stringer = new JSONStringer();
            convert(stringer, c);
            String result = stringer.toString();
            if(AppLogger.isDebugEnabled()) { 
                AppLogger.debug(result);
            } 
            return result;
        } 
         
        private static final void convert(JSONStringer js, Cursor c) {
            try { 
                js.array();
                while(c.moveToNext()) {
                    js.object();
                    Long runId = runId(c);
                    if(runId != null) {