// Path: json-unit-core/src/main/java/net/javacrumbs/jsonunit/core/internal/Utils.java
// static class JsonStringReader extends StringReader {
//     private final String string;
// 
//     public JsonStringReader(@NotNull String s) {
//         super(s);
//         this.string = s;
//     }
// 
//     public String getString() {
//         return string;
//     }
// }
// 
// Path: json-unit-core/src/main/java/net/javacrumbs/jsonunit/core/internal/Utils.java
// static void closeQuietly(final Reader resourceReader) {
//     if (resourceReader != null) {
//         try {
//             resourceReader.close();
//         } catch (IOException ignored) {
//         }
//     }
// }
// 
// Path: json-unit-core/src/main/java/net/javacrumbs/jsonunit/core/internal/Utils.java
// static Reader toReader(String string) {
//     return new JsonStringReader(string);
// }


import net.javacrumbs.jsonunit.core.internal.Utils.JsonStringReader;
import org.jetbrains.annotations.NotNull;
import java.io.Reader;
import java.math.BigDecimal;
import static net.javacrumbs.jsonunit.core.internal.Utils.closeQuietly;
import static net.javacrumbs.jsonunit.core.internal.Utils.toReader;
            return nullNode();
        } else {
            return convertValue(source);
        }
    }

    final Node convertValue(Object source) {
        if (source instanceof BigDecimal) {
            return new GenericNodeBuilder.NumberNode((Number) source);
        } else {
            return doConvertValue(source);
        }
    }


    @NotNull
    protected IllegalArgumentException newParseException(String label, Reader value, Exception e) {
        if (value instanceof JsonStringReader) {
            return new IllegalArgumentException("Can not parse " + label + " value: '" + ((JsonStringReader) value).getString() + "'", e);
        } else {
            return new IllegalArgumentException("Can not parse " + label + " value.", e);
        }
    }


    protected abstract Node doConvertValue(Object source);

    protected abstract Node readValue(Reader reader, String label, boolean lenient);

    Node readValue(String source, String label, boolean lenient) {
// Path: json-unit-core/src/main/java/net/javacrumbs/jsonunit/core/internal/Utils.java
// static class JsonStringReader extends StringReader {
//     private final String string;
// 
//     public JsonStringReader(@NotNull String s) {
//         super(s);
//         this.string = s;
//     }
// 
//     public String getString() {
//         return string;
//     }
// }
// 
// Path: json-unit-core/src/main/java/net/javacrumbs/jsonunit/core/internal/Utils.java
// static void closeQuietly(final Reader resourceReader) {
//     if (resourceReader != null) {
//         try {
//             resourceReader.close();
//         } catch (IOException ignored) {
//         }
//     }
// }
// 
// Path: json-unit-core/src/main/java/net/javacrumbs/jsonunit/core/internal/Utils.java
// static Reader toReader(String string) {
//     return new JsonStringReader(string);
// }


// Path: json-unit-core/src/main/java/net/javacrumbs/jsonunit/core/internal/AbstractNodeFactory.java
import net.javacrumbs.jsonunit.core.internal.Utils.JsonStringReader;
import org.jetbrains.annotations.NotNull;
import java.io.Reader;
import java.math.BigDecimal;
import static net.javacrumbs.jsonunit.core.internal.Utils.closeQuietly;
import static net.javacrumbs.jsonunit.core.internal.Utils.toReader;

            return nullNode();
        } else {
            return convertValue(source);
        }
    }

    final Node convertValue(Object source) {
        if (source instanceof BigDecimal) {
            return new GenericNodeBuilder.NumberNode((Number) source);
        } else {
            return doConvertValue(source);
        }
    }


    @NotNull
    protected IllegalArgumentException newParseException(String label, Reader value, Exception e) {
        if (value instanceof JsonStringReader) {
            return new IllegalArgumentException("Can not parse " + label + " value: '" + ((JsonStringReader) value).getString() + "'", e);
        } else {
            return new IllegalArgumentException("Can not parse " + label + " value.", e);
        }
    }


    protected abstract Node doConvertValue(Object source);

    protected abstract Node readValue(Reader reader, String label, boolean lenient);

    Node readValue(String source, String label, boolean lenient) {
        return readValue(toReader(source), label, lenient);