PropertyIndex.storeJSON("UserDB") 按相同的属性顺序或字母顺序

PropertyIndex.storeJSON("UserDB") in the same order of Properties or alphabetical order

我有复杂的 PropertyBusinessObjects,其中有很多属性。 出于我的 debugging/development 目的,PropertyIndexstoreJSON 方法按照我声明它们的相同顺序将属性保存在 JSON 中可能更方便PropertyBusinessObject 或者,如果不可能,按字母顺序排列。

目前,属性以随机顺序存储,这对代码来说没问题,但不适合人类阅读。

我该怎么做?谢谢

你做不到,但我们可以。我添加了一个修复程序来保持属性的自然顺序:https://github.com/codenameone/CodenameOne/commit/a0a54c7d51ce980710eeecaf91ad4a1253c43e7f