poke-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RFC] New JSON representation for Poke values in MI


From: Kostas Chasialis
Subject: [RFC] New JSON representation for Poke values in MI
Date: Mon, 23 Aug 2021 17:42:17 +0200

Hello people of Poke,

After long discussions, me and Mohammad decided that the current JSON schema 
and generally the implementation using this schema had many problems.

Firstly, using the previous schema, we could not encode many poke values, like 
int[10][30].

Moreover, the previous schema made the generated JSON too long, by repeating 
information again and again.
Mohammad presented an example that for a not very long Poke array they JSON 
generated was 117Kbs. As he said, this is not acceptable, and I totally agree.

Finally, we also wanted to change the schema for simplicity reasons.

The first main modification is that we included PokeType object which 
represents a pk(pvm)_type.
The second main modification is that we separated PokeType from PokeValue, in 
order to eliminate duplicate information.

The main drawback, however, of the new schema is that it is not very strict, 
and by that I mean that a validator will not be able to catch possible errors.
This means we have to make excessive error-checking in the C code that handles 
JSON data.

You can find attached:

1) The new JSON schema.
2) Previous JSONs that used the previous schema (_old)
3) Updated JSONs that use the schema attached (_new)

Any comments are welcome!

Thanks.

Attachment: pk_uint_old.json
Description: application/json

Attachment: pk_uint_new.json
Description: application/json

Attachment: pk_string_old.json
Description: application/json

Attachment: pk_string_new.json
Description: application/json

Attachment: pk_sct_old.json
Description: application/json

Attachment: pk_sct_new.json
Description: application/json

Attachment: pk_sct_empty_old.json
Description: application/json

Attachment: pk_sct_empty_new.json
Description: application/json

Attachment: pk_sct_empty_mapped_old.json
Description: application/json

Attachment: pk_sct_empty_mapped_new.json
Description: application/json

Attachment: pk_offset_uint_old.json
Description: application/json

Attachment: pk_offset_uint_new.json
Description: application/json

Attachment: pk_offset_old.json
Description: application/json

Attachment: pk_offset_new.json
Description: application/json

Attachment: pk_int_old.json
Description: application/json

Attachment: pk_int_new.json
Description: application/json

Attachment: pk_array_old.json
Description: application/json

Attachment: pk_array_new.json
Description: application/json

Attachment: old_schema.json
Description: application/json

Attachment: new_schema.json
Description: application/json


reply via email to

[Prev in Thread] Current Thread [Next in Thread]