ohos: map only own enumerable JS properties to JSON
QtHarmony::mapJsObjectToQJsonObject() is documented to map the
enumerable properties of a JS object, but on a HarmonyOS device it also
maps non-enumerable ones. The mapping iterates over a Napi::Object,
which takes its keys from napi_get_property_names(), and on that device
the function returns non-enumerable and symbol keys as well.
Even when napi_get_property_names() behaves as documented, it is not
the right source of keys for JSON: it includes inherited properties,
while JSON.stringify() takes only the object's own enumerable ones. On
that device inherited properties are not mapped either, so taking own
keys only changes nothing there.
Map the properties of the object's own enumerable string keys, taken
from QNapi::Object::getFilteredStringKeys().
Task-number: QTBUG-151396
Pick-to: 6.12
Change-Id: Ibb97bc4f2eaa62c04ce90c337a4fe0c6a9604963
Reviewed-by: SanthoshKumar Selvaraj <santhosh.kumar.selvaraj@qt.io>
Reviewed-by: Adam Krzykala <adam.krzykala@qt.io>