ngs
ngs copied to clipboard
[patterns] Support optional keys in Hash / objects
Given the hash h
, check that either key k
is not present or, if it is present, it matches the pattern p
.
Right now there is no straightforward way to check the above. Use case: id
and params
in https://www.jsonrpc.org/specification
Idea:
{"key": IfExists(pattern)}
In dev