Closed danriedl closed 3 weeks ago
Hey @danriedl 👋 It's by design. Values in caches are stored as bytes, so this
will throw an error if the data it gets isn't something that can be parsed using a JSON parser. What you want to use there is root.name = content().string()
. The .string()
part is needed because otherwise the data in that name
field will get serialised back to JSON using base64 encoding.
Hey @danriedl 👋 It's by design. Values in caches are stored as bytes, so this
will throw an error if the data it gets isn't something that can be parsed using a JSON parser. What you want to use there is root.name = content().string()
. The .string()
part is needed because otherwise the data in that name
field will get serialised back to JSON using base64 encoding.
PS: Converting this to a discussion as per #2026.
I did expect that the
memory
cache_resource works with maps/lists/strings. Somehow it only works if the provided value is a number or a number as string.This works:
And this does not work:
Is it a bug or a feature?
Thanks in advance!