mirror of
https://github.com/logos-storage/nim-serde.git
synced 2026-01-02 13:43:06 +00:00
- change empty string value to none when optional - handle null, "null", JNull, seq[stint], seq[?string]
8 lines
213 B
Nim
8 lines
213 B
Nim
import std/json
|
|
|
|
func isEmptyString*(json: JsonNode): bool =
|
|
return json.kind == JString and json.getStr == ""
|
|
|
|
func isNullString*(json: JsonNode): bool =
|
|
return json.kind == JString and json.getStr == "null"
|