package com.github.nsnjson;

import com.fasterxml.jackson.databind.JsonNode;
import com.github.nsnjson.decoding.*;
import com.github.nsnjson.encoding.*;

import java.util.Optional;

/**
 * NSNJSON Driver.
 */
public class Driver {

    /**
     * Encodes JSON to NSNJSON presentation.
     * @see Encoder#encode(JsonNode)
     * @param data any JSON data
     * @return NSNJSON presentation of JSON
     */
    public static Optional<JsonNode> encode(JsonNode data) {
        return Encoder.encode(data);
    }

    /**
     * Encodes JSON to NSNJSON presentation by custom encoding.
     * @see Encoder#encode(JsonNode, Encoding)
     * @param data any JSON data
     * @return NSNJSON presentation of JSON
     */
    public static Optional<JsonNode> encode(JsonNode data, Encoding encoding) {
        return Encoder.encode(data, encoding);
    }

    public static Optional<JsonNode> encodeWithArrayStyle(JsonNode data) {
        return Encoder.encodeWithArrayStyle(data);
    }

    public static Optional<JsonNode> encodeWithObjectStyle(JsonNode data) {
        return Encoder.encodeWithObjectStyle(data);
    }

    /**
     * Decodes JSON from specified NSNJSON presentation.
     * @see Decoder#decode(JsonNode)
     * @param presentation NSNJSON presentation of JSON
     * @return JSON
     */
    public static Optional<JsonNode> decode(JsonNode presentation) {
        return Decoder.decode(presentation);
    }

    /**
     * Decodes JSON from specified NSNJSON presentation by custom decoding.
     * @see Decoder#decode(JsonNode, Decoding)
     * @param presentation NSNJSON presentation of JSON
     * @param decoding custom decoding
     * @return JSON
     */
    public static Optional<JsonNode> decode(JsonNode presentation, Decoding decoding) {
        return Decoder.decode(presentation, decoding);
    }

}
@@ -1115,315 +1115,8 @@
  %7D%0A%0A
-    /**%0A     * Decodes JSON from specified NSNJSON presentation.%0A     * @see Decoder#decode(JsonNode)%0A     * @param presentation NSNJSON presentation of JSON%0A     * @return JSON%0A     */%0A    public static Optional%3CJsonNode%3E decode(JsonNode presentation) %7B%0A        return Decoder.decode(presentation);%0A    %7D%0A%0A
     

Delete method { Driver @ decode }