write.json seems to be changing keys that starts with an underscore _ . This only happens when executing the bytecode.
Minimal reproduction (repo):
git clone https://github.com/jinyus/arturo_bug_demo.git ;
cd arturo_bug_demo ;
./run.sh
Code
posts: read.json "./posts.json"
allPostIDs: map.with:'i posts 'p [
#[
"_id": get p "_id",
"_index": i,
]
]
print write.json ø allPostIDs
Ouput:
Running arturo demo.art (correct)
[
{
"_id": "h5cwwbua",
"_index": 0
},
{
"_id": "jf0da9ku",
"_index": 1
}
]
Running arturo -x demo.art.bcode (modifying the key)
[
{
"id": "h5cwwbua",
"index": 0
},
{
"id": "jf0da9ku",
"index": 1
}
]
write.jsonseems to be changing keys that starts with an underscore_. This only happens when executing the bytecode.Minimal reproduction (repo):
Code
Ouput:
Running arturo demo.art (correct)
Running arturo -x demo.art.bcode (modifying the key)