code: 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();
          }
      }
docs: Encodes a object into a JSON string and outputs a file.
  
  @param source A object to encode.
  @param file An output file.
  
  @throws IOException
  If an I/O error is occurred.
  @throws ParserException
  If an error is occurred while parsing the read data.