5 ms·
The JSON config is strange, the keys contain type information. But any JSON parser worth its salt should not require that since JSON is natively typed, no?
by diarrhea 6y ago
The JSON config is strange, the keys contain type information. But any JSON parser worth its salt should not require that since JSON is natively typed, no?
- tyingq 6y agoWhere? I don't see that. What type info is below? Do you mean "mapList"? I suspect it's just what they chose to name the key. "triestimes": 3, "mapList": [ { "desc": "ftp", "nExternalPort": 6221, "nInternalPort": 21, "sProtocol": "TCP", "bEnable": 0 },...
- philo23 6y agoI suspect they mean the letter prefixes: _n_ExternalPort + _n_InternalPort for number, _s_Protocol for string and _b_Enable for boolean. It's probably just a convention they use in the source code that's made its way into the JSON by serializing something? Either that or old habits die hard.