Android examples for File Input Output:Json
float Array to Json
//package com.java2s; public class Main { static String floatArray2Json(final float[] array) { if (array.length == 0) { return "[]"; }//w w w . j a v a2 s.co m final StringBuilder sb = new StringBuilder(array.length << 4); sb.append('['); for (final float o : array) { sb.append(Float.toString(o)); sb.append(','); } // set last ',' to ']': sb.setCharAt(sb.length() - 1, ']'); return sb.toString(); } }