Merge pull request #39 from WolframResearch/bugfix/fix-jsonoutofrangeunicode-error

Allow the evaluation of alpha=1 without tanking the Jupyter session
This commit is contained in:
cc-wr 2019-06-03 08:23:11 -04:00 committed by GitHub
commit cd001760bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,7 +71,16 @@ If[
EndOfString :>
Prepend[
(* add back in the brackets *)
StringJoin["{", #1, "}"] & /@ {json2,json3,json4,json5},
(
Association[
ImportByteArray[
StringToByteArray[
StringJoin["{", #1, "}"]
],
"JSON"
]
] &
) /@ {json2,json3,json4,json5},
(* use the length of ident1 *)
StringLength[ident1]
]
@ -86,8 +95,8 @@ If[
Return[
Association[
"ident" -> baFrame[[;;identLen]],
"header" -> Association[ImportString[header, "JSON"]],
"content" -> Association[ImportString[content, "JSON"]]
"header" -> header,
"content" -> content
]
];
];