/** * Return the modified JSON representation for the supplied in-memory {@link Document}. The resulting JSON will have no * embedded line feeds or extra spaces. * <p> * This format is compact and easy for software to read, but usually very difficult for people to read anything but very small * documents. * </p> * * @param bson the BSON object or BSON value; may not be null * @return the string; may not be null */ public static String write( Document bson ) { return getCompactJsonWriter().write(bson); }
/** * Write to the supplied writer the modified JSON representation of the supplied in-memory {@link Document}. The resulting * JSON will have no embedded line feeds or extra spaces. * <p> * This format is compact and easy for software to read, but usually very difficult for people to read anything but very small * documents. * </p> * * @param bson the BSON object or BSON value; may not be null * @param writer the writer; may not be null * @throws IOException if there was a problem reading from the stream */ public static void write( Document bson, Writer writer ) throws IOException { getCompactJsonWriter().write(bson, writer); }
/** * Return the modified JSON representation for the supplied in-memory {@link Document}. The resulting JSON will have no * embedded line feeds or extra spaces. * <p> * This format is compact and easy for software to read, but usually very difficult for people to read anything but very small * documents. * </p> * * @param bson the BSON object or BSON value; may not be null * @return the string; may not be null */ public static String write( Document bson ) { return getCompactJsonWriter().write(bson); }
/** * Return the modified JSON representation for the supplied object value. The resulting JSON will have no embedded line feeds * or extra spaces. * <p> * This format is compact and easy for software to read, but usually very difficult for people to read anything but very small * documents. * </p> * * @param value the BSON object or BSON value; may not be null * @return the string; may not be null */ public static String write( Object value ) { return getCompactJsonWriter().write(value); }
/** * Return the modified JSON representation for the supplied object value. The resulting JSON will have no embedded line feeds * or extra spaces. * <p> * This format is compact and easy for software to read, but usually very difficult for people to read anything but very small * documents. * </p> * * @param value the BSON object or BSON value; may not be null * @return the string; may not be null */ public static String write( Object value ) { return getCompactJsonWriter().write(value); }
/** * Write to the supplied writer the modified JSON representation of the supplied in-memory {@link Document}. The resulting * JSON will have no embedded line feeds or extra spaces. * <p> * This format is compact and easy for software to read, but usually very difficult for people to read anything but very small * documents. * </p> * * @param bson the BSON object or BSON value; may not be null * @param stream the output stream; may not be null * @throws IOException if there was a problem reading from the stream */ public static void write( Document bson, OutputStream stream ) throws IOException { getCompactJsonWriter().write(bson, stream); }
/** * Write to the supplied writer the modified JSON representation of the supplied in-memory {@link Document}. The resulting * JSON will have no embedded line feeds or extra spaces. * <p> * This format is compact and easy for software to read, but usually very difficult for people to read anything but very small * documents. * </p> * * @param bson the BSON object or BSON value; may not be null * @param stream the output stream; may not be null * @throws IOException if there was a problem reading from the stream */ public static void write( Document bson, OutputStream stream ) throws IOException { getCompactJsonWriter().write(bson, stream); }
/** * Write to the supplied writer the modified JSON representation of the supplied in-memory {@link Document}. The resulting * JSON will have no embedded line feeds or extra spaces. * <p> * This format is compact and easy for software to read, but usually very difficult for people to read anything but very small * documents. * </p> * * @param bson the BSON object or BSON value; may not be null * @param writer the writer; may not be null * @throws IOException if there was a problem reading from the stream */ public static void write( Document bson, Writer writer ) throws IOException { getCompactJsonWriter().write(bson, writer); }