code: public static void exportJson(JsonWriter writer, Resource resource)
              throws RepositoryException, IOException {
          exportJson(writer, resource, MappingRules.getDefaultMappingRules());
      }
docs: Writes a resources JSON view to a writer using the default application rules for filtering.
  
  @param writer   the writer for the JSON transformation
  @param resource the resource to transform
  @throws RepositoryException
  @throws IOException