You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hence we can check whether a file is found in JSON scheme. We also need to add an attribute the JSON sceme description (a single attribute for each StaticMap in a JSON scheme) to specify if extra fileds must be diagnose.
The second case is more complex.
We need to specify which fields must be check, so we must a corresponding attribute to the description of an each cell in a StaticMap in a JSON scheme. Therefore, macros which are used to specify scheme have to be updated.
Implementation of the check procedure also faces shortcomings.The parser function traverse all fields in a text representation and for each field it searches for a corresponding field in a JSON scheme. This means, that we need to remember fields in a JSON scheme which has a corresponding pair in a text representation, so at the end of the traverse of a text representation we can find missing fields. However, current implementation of traverse and parse methods processes each field separatly and doesn't allow to forward information from the proccessing of one field to another.
To overcome this issue a State argument can be added to traverse and parse method. Another possibility is to traverse a text representation twice, so the first traverse will collect specified filds and than we can visit them again to parse.
The text was updated successfully, but these errors were encountered:
At this moment all named fields in a JSON are optional, so two cases are possible:
To check the first case we can easely fix implementation of:
Hence we can check whether a file is found in JSON scheme. We also need to add an attribute the JSON sceme description (a single attribute for each
StaticMap
in a JSON scheme) to specify if extra fileds must be diagnose.The second case is more complex.
We need to specify which fields must be check, so we must a corresponding attribute to the description of an each cell in a
StaticMap
in a JSON scheme. Therefore, macros which are used to specify scheme have to be updated.Implementation of the check procedure also faces shortcomings.The
parser
function traverse all fields in a text representation and for each field it searches for a corresponding field in a JSON scheme. This means, that we need to remember fields in a JSON scheme which has a corresponding pair in a text representation, so at the end of the traverse of a text representation we can find missing fields. However, current implementation oftraverse
andparse
methods processes each field separatly and doesn't allow to forward information from the proccessing of one field to another.To overcome this issue a
State
argument can be added totraverse
andparse
method. Another possibility is to traverse a text representation twice, so the first traverse will collect specified filds and than we can visit them again to parse.The text was updated successfully, but these errors were encountered: