After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 779970 - Parsed arrays are immutable even with mutable parser instance
Parsed arrays are immutable even with mutable parser instance
Status: RESOLVED FIXED
Product: json-glib
Classification: Core
Component: Parser
git master
Other Linux
: Normal normal
: ---
Assigned To: json-glib-maint
json-glib-maint
https://github.com/LuckyBC/Json-Glib
Depends on:
Blocks:
 
 
Reported: 2017-03-13 08:35 UTC by luckybc
Modified: 2017-03-13 09:16 UTC
See Also:
GNOME target: ---
GNOME version: 3.25/3.26


Attachments
Only seal arrays and objects when a parser is immutable (1.17 KB, patch)
2017-03-13 09:15 UTC, Emmanuele Bassi (:ebassi)
committed Details | Review

Description luckybc 2017-03-13 08:35:42 UTC
Hi,

I am trying to change value of JsonNode in JsonArray via json_path_query, but It couldn't "json_node_set_string: assertion '!node->immutable' failed". 

Link: https://github.com/LuckyBC/Json-Glib
Comment 1 Emmanuele Bassi (:ebassi) 2017-03-13 09:15:25 UTC
Created attachment 347813 [details] [review]
Only seal arrays and objects when a parser is immutable

We seal nodes conditionally on the :immutable property, but we are
sealing their contents unconditionally.
Comment 2 Emmanuele Bassi (:ebassi) 2017-03-13 09:15:57 UTC
Attachment 347813 [details] pushed as 0cb1db3 - Only seal arrays and objects when a parser is immutable