Browse Source

Change arg of `_.json.Pointer()` to be optional

This method was creating an empty json pointer when user passed a `none`
value, but having to pass `none` made for a bad interface. This patch
allows to simply omit the argument.
pull/8/head
Anton Tarasenko 3 years ago
parent
commit
4af70b95c1
  1. 2
      sources/Text/JSON/JSONAPI.uc

2
sources/Text/JSON/JSONAPI.uc

@ -79,7 +79,7 @@ private final function InitFormatting()
* an incorrect JSON pointer or `none`, - empty `JSONPointer` will be
* returned.
*/
public final function JSONPointer Pointer(Text pointerAsText)
public final function JSONPointer Pointer(optional Text pointerAsText)
{
return JSONPointer(_.memory.Allocate(class'JSONPointer'))
.Set(pointerAsText);

Loading…
Cancel
Save