diff --git a/lib/jmespath/nodes/function.rb b/lib/jmespath/nodes/function.rb index 1cc3d2e..7b705fa 100644 --- a/lib/jmespath/nodes/function.rb +++ b/lib/jmespath/nodes/function.rb @@ -313,7 +313,7 @@ class ToStringFunction < Function def call(args) if args.count == 1 value = args.first - String === value ? value : MultiJson.dump(value) + String === value ? value : JSON.dump(value) else return maybe_raise Errors::InvalidArityError, "function to_string() expects one argument" end