Replace fromJsonObject/asJsonObject API with fromJsonValue/asJsonValue


Rename the serialization interface on generated model classes and the
Object base type to use QJsonValue instead of QJsonObject. This aligns
with the broader Qt JSON API, avoids unnecessary conversions between
QJsonObject and QJsonValue, and enables correct handling of non-object
JSON values (null, arrays) in fromJson/fromJsonValue paths.

- Replace `asJsonObject()` -> `asJsonValue()` and
  `fromJsonObject(QJsonObject)` -> `fromJsonValue(QJsonValue)` in
  object/model Mustache templates and helpers
- Switch `fromJson(QString)` to use `QJsonValue::fromJson()` instead of
  going through QJsonDocument
- Update examples, tests, and api-body template call sites accordingly

[ChangeLog][qtopenapi-generator] The fromJsonObject/asJsonObject
API methods of the generated objects and models are replaced with
fromJsonValue/asJsonValue.

Change-Id: I34c08a6c03d56bdffae5d5737072f1d9ded198cd
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
commit03484d1fb4c40f8c7820931dbe90a1034a48d336
parente85e3780127ee9d3e41d281dff2063d21ce96ccd
authorTatiana Borisova <tatiana.borisova@qt.io>
committerTatiana Borisova <tatiana.borisova@qt.io>
commit timeSat, 25 Apr 2026 19:36:06 +0000