helpers: Fix fromByteArray for {{prefix}}Object and add tests


fromByteArray(QString, {{prefix}}Object) was accepting any valid json,
not just objects. Add an isObject() check so arrays and other
non-object types now correctly return false. The output value is also
left intact on failure, consistent with other overloads.

Add tests covering valid objects, invalid json, non-object json, and
an empty object case.

Pick-to: 6.11
Task-number: QTBUG-145232
Change-Id: I97760c435333a198f4a8383525b314a733359aef
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
commitdcaed59676d32397bdbd29b8c25c643e5606ab73
parent67e51326f6b73ce8edcff793303d7616bd4e7894
authorRym Bouabid <rym.bouabid@qt.io>
committerRym Bouabid <rym.bouabid@qt.io>
commit timeWed, 27 May 2026 12:12:36 +0000