From bfea0319aa07ad2c921ba29ba216e921d65f2ed1 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 9 Jan 2024 00:23:16 +0000 Subject: Integer support in persistence Splits bool and arithmatic types, pass arithmatic values as string views from JSON and parse according to the target type. --- lib/jsonParse-persistence.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/jsonParse-persistence.h') diff --git a/lib/jsonParse-persistence.h b/lib/jsonParse-persistence.h index a676282..6edebc7 100644 --- a/lib/jsonParse-persistence.h +++ b/lib/jsonParse-persistence.h @@ -27,7 +27,7 @@ namespace Persistence { void beginObject() override; void beginArray() override; void pushBoolean(bool value) override; - void pushNumber(float value) override; + void pushNumber(std::string_view value) override; void pushNull() override; void pushText(std::string && value) override; void pushKey(std::string && k) override; @@ -54,6 +54,7 @@ namespace Persistence { void beginArray() const override; void pushValue(bool value) const override; void pushValue(float value) const override; + void pushValue(int value) const override; void pushValue(std::nullptr_t) const override; void pushValue(const std::string_view value) const override; void nextValue() const override; -- cgit v1.2.3