lib/ldclient-rb/reference.rb in launchdarkly-server-sdk-8.4.2 vs lib/ldclient-rb/reference.rb in launchdarkly-server-sdk-8.5.0
- old
+ new
@@ -237,9 +237,19 @@
def hash
([error] + components).hash
end
#
+ # Convert the Reference to a JSON string.
+ #
+ # @param args [Array]
+ # @return [String]
+ #
+ def to_json(*args)
+ JSON.generate(@raw_path, *args)
+ end
+
+ #
# Performs unescaping of attribute reference path components:
#
# "~1" becomes "/"
# "~0" becomes "~"
# "~" followed by any character other than "0" or "1" is invalid