From 4af70b95c1ff90415b6d6cb2a7f9120ed6e58d20 Mon Sep 17 00:00:00 2001 From: Anton Tarasenko Date: Sun, 5 Dec 2021 02:11:01 +0700 Subject: [PATCH] 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. --- sources/Text/JSON/JSONAPI.uc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/Text/JSON/JSONAPI.uc b/sources/Text/JSON/JSONAPI.uc index 5b7b39e..2cec812 100644 --- a/sources/Text/JSON/JSONAPI.uc +++ b/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);