package io.burt.jmespath.node;

import io.burt.jmespath.Adapter;

public class JsonLiteralNode<T> extends Node<T> {
  private final String rawJson;
  private final T json;

  public JsonLiteralNode(Adapter<T> runtime, String rawJson) {
    super(runtime);
    this.rawJson = rawJson;
    this.json = runtime.parseString(rawJson);
  }

  @Override
  public T search(T input) {
    return json;
  }

  @Override
  protected String internalToString() {
    return rawJson;
  }

  @Override
  protected boolean internalEquals(Object o) {
    JsonLiteralNode<?> other = (JsonLiteralNode<?>) o;
    return json.equals(other.json);
  }

  @Override
  protected int internalHashCode() {
    return json.hashCode();
  }
}

@@ -131,28 +131,29 @@
 l String raw
-Json
+Value
 ;%0A  private 
@@ -160,20 +160,21 @@
 final T 
-json
+value
 ;%0A%0A  pub
@@ -223,20 +223,21 @@
 ring raw
-Json
+Value
 ) %7B%0A    
@@ -268,22 +268,24 @@
 .raw
-Json
+Value
  = raw
-Json
+Value
 ;%0A  
@@ -291,20 +291,21 @@
    this.
-json
+value
  = runti
@@ -322,20 +322,21 @@
 ring(raw
-Json
+Value
 );%0A  %7D%0A%0A
@@ -387,20 +387,21 @@
  return 
-json
+value
 ;%0A  %7D%0A%0A 
@@ -465,20 +465,21 @@
 turn raw
-Json
+Value
 ;%0A  %7D%0A%0A 
@@ -602,20 +602,21 @@
  return 
-json
+value
 .equals(
@@ -621,20 +621,21 @@
 s(other.
-json
+value
 );%0A  %7D%0A%0A
@@ -698,12 +698,13 @@
 urn 
-json
+value
 .has

Use "value" and not "json" in JsonLiteralNode