+ /**
+ * Create a new {@link JsonParserStream} backed by specified {@link NormalizedNodeStreamWriter}
+ * and {@link JSONCodecFactory}. The stream will be logically rooted at the top of the SchemaContext associated
+ * with the specified codec factory.
+ *
+ * <p>
+ * Returned parser will treat incoming JSON data leniently:
+ * <ul>
+ * <li>JSON elements referring to unknown constructs will be silently ignored</li>
+ * </ul>
+ *
+ * @param writer NormalizedNodeStreamWriter to use for instantiation of normalized nodes
+ * @param codecFactory {@link JSONCodecFactory} to use for parsing leaves
+ * @return A new {@link JsonParserStream}
+ * @throws NullPointerException if any of the arguments are null
+ */
+ public static @NonNull JsonParserStream createLenient(final @NonNull NormalizedNodeStreamWriter writer,
+ final @NonNull JSONCodecFactory codecFactory) {
+ return new JsonParserStream(writer, codecFactory, codecFactory.getSchemaContext(), true);
+ }
+
+ /**
+ * Create a new {@link JsonParserStream} backed by specified {@link NormalizedNodeStreamWriter}
+ * and {@link JSONCodecFactory}. The stream will be logically rooted at the specified parent node.
+ *
+ * <p>
+ * Returned parser will treat incoming JSON data leniently:
+ * <ul>
+ * <li>JSON elements referring to unknown constructs will be silently ignored</li>
+ * </ul>
+ *
+ * @param writer NormalizedNodeStreamWriter to use for instantiation of normalized nodes
+ * @param codecFactory {@link JSONCodecFactory} to use for parsing leaves
+ * @param parentNode Logical root node
+ * @return A new {@link JsonParserStream}
+ * @throws NullPointerException if any of the arguments are null
+ */
+ public static @NonNull JsonParserStream createLenient(final @NonNull NormalizedNodeStreamWriter writer,
+ final @NonNull JSONCodecFactory codecFactory, final @NonNull SchemaNode parentNode) {
+ return new JsonParserStream(writer, codecFactory, validateParent(parentNode), true);
+ }
+