package com.github.nsnjson.encoding;

import com.fasterxml.jackson.databind.JsonNode;

import java.util.Optional;

public class Encoder {

    private static final Encoding DEFAULT_ENCODING = new DefaultEncoding();

    public static Optional<JsonNode> encode(JsonNode json) {
        return DEFAULT_ENCODING.encode(json);
    }

}
@@ -323,9 +323,180 @@
 %0A    %7D%0A%0A
+    public static Optional%3CJsonNode%3E encode(JsonNode json, Encoding encoding) %7B%0A        return Optional.ofNullable(encoding).orElse(DEFAULT_ENCODING).encode(json);%0A    %7D%0A%0A
 %7D

Implement method { Encoder @ encode(JsonNode, Encoding) }