Search found 6 matches
- Fri Sep 11, 2020 8:13 am
- Forum: General Discussion
- Topic: How to handle type changes?
- Replies: 12
- Views: 5298
Re: How to handle type changes?
I didn't check how the binary parser works, but in JSON, there's more or less 3 big types of data: values (string, int, float...), arrays and dictionaries/objects. The differentiation is easy to make since they just start with different characters. You obviously know all that already since this is w...
- Thu Sep 10, 2020 9:42 am
- Forum: General Discussion
- Topic: How to handle type changes?
- Replies: 12
- Views: 5298
Re: How to handle type changes?
I fail to see how that would impact file size. The way I see it: the parser will read the data, try to apply it to the values, notice it doesn't fit, buffer the read data and continue. At the end of the parsing, a callback would be called with the buffered data so that the client can choose to make ...
- Wed Sep 09, 2020 5:34 pm
- Forum: General Discussion
- Topic: How to handle type changes?
- Replies: 12
- Views: 5298
Re: How to handle type changes?
That's an acceptable workaround and in the lines of we actually did already ahah. However, that means that we have to switch to a fully manual serialization of the members which is something we were exactly to try avoiding. It would be nicer if we could have the default behavior for everything but j...
- Wed Sep 09, 2020 12:17 pm
- Forum: General Discussion
- Topic: How to handle type changes?
- Replies: 12
- Views: 5298
Re: How to handle type changes?
Also, I'm not exactly against the type of exception being thrown, it's more the message that is a problem. It talks about JSON stuff. If I switch to the binary format it will talk about binary problems I guess. The message should be that the serialized data is not matching the expected type.
- Wed Sep 09, 2020 10:54 am
- Forum: General Discussion
- Topic: How to handle type changes?
- Replies: 12
- Views: 5298
Re: How to handle type changes?
I fail to see how implementing an ES3Type here would save us. The code could be something in the lines of reading the variable in its current data format in a try block and then trying to read the old data format in the catch block. But since the stream would have already been consumed by the first ...
- Wed Sep 09, 2020 9:59 am
- Forum: General Discussion
- Topic: How to handle type changes?
- Replies: 12
- Views: 5298
How to handle type changes?
Hello, Recently we made a change to one of our saved data structures: a List<Loot> was changed to Dictionary<string, int> . Loot was a structure with several values half of them were not actually useful in the save... Anyway, this change yielded two issues: - It raised an exception while loading tha...