public void encode ( Object source , File file ) throws IOException , ParserException { Writer writer = null ; try { writer = new Writer ( file ) ; net . arnx . jsonic . JSON . encode ( source , writer , true ) ; } catch ( net . arnx . jsonic . JSONException e ) { throw new ParserException ( e . getMessage ( ) ) ; } finally { if ( writer != null ) writer . close ( ) ; } }
Encodes a object into a JSON string and outputs a file .