Deserialized containers.Map keys exceed max name length
古いコメントを表示
While trying to desirialize a containers.Map I get a cell2struct error in matlab.internal.json.makeStructure due to duplicate field names. The duplicate field names stem from Map keys which are more than 70 chars long and differ only in the last chars (I have no influence on the length of these keys). I use jsonencode/jsondecode to de/serialize the Map. Is there a simple workaround for this problem or am I missing an option or s.th.?
2 件のコメント
Adam
2017 年 11 月 3 日
If containers.Map allows keys longer than the maximum length of a struct field then that will always lead to a problem if you want to convert one to the other. I don't quite see why json gets involved in converting map keys to fields of a struct, but I assume that is something to do with the map values instead?
Björn Plewinski
2017 年 11 月 3 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で JSON Format についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!