JSONAPI couldn't parse JSON values like " {"key": :value"}" because of
the spaces before the opening curly brace. This behaviour was judged to
be unintuitive and a bug. This patch fixes the issue by always skipping
spaces in front of the value.
This should not break parsing JSON string values, since they are
supposed to start with double quotation mark.
This is regarding an artifact left after text refactoring: when printing
JSON text values, they were being converted into `Text`, which after
refactoring always basically erased `MutableText` value, emptying it.
Previously `Iter` was meant to be a collection iterator class, but now
we need a more generalized notion of iterator, so we move some
collection-specific methods out and designate `Iter` a general iterator
class, while `CollectionIterator` takes its former place.
When parsing values inside JSON object/array, stored objects and arrays
would always be parsed as `DynamicArray`/`AssociativeArray`, despite
starting parsing as new collections.
There are many occasions for Acedia where we might want to limit names
of objects to a certain predictable and manageable set and limitations
placed on config names seem to fit all of these cases.
That is why we rename `IsValidConfigName()` into a more
generic-sounding method name.
Additional change is limiting length of a "valid name" to 50 characters
at most, since Unreal Engine doesn't like loing config lines.
Several methods such as `Copy()`, `Remove()`, `ChangeFormatting()` and
several others have had similar errors related to how their input
parameters defined range when specified out-of-bounds.
This patch should fix them.
Previously one could only read formatted data directly from `string`s.
This patch adds another method `AppendFormatted()` for appending a
`Text`/`MutableText`, while parsing its data like a formatted string.
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.
`Copy()` and `MutableCopy()` methods for `Text` incorrectly handled
negative arguments in some cases. They were fixed and appropriate tests
were added.
I shamefully ended up doing another mega-commit, because a lot of things
needed to be redone at once and it was easier that way on me. No one
really consistently tracks what I'm doing with these commits anyway.
This adds a whole bunch of code to deal with proper clean up for Acedia,
so it doesn't crash on map change and also replaces old event/listener
system with new signals/slots one.