From 48c32ab4e1c0611feb368fa70183ce9f9ec4b679 Mon Sep 17 00:00:00 2001 From: cc-wr <47033353+cc-wr@users.noreply.github.com> Date: Fri, 31 May 2019 14:55:37 -0400 Subject: [PATCH] Allow the evaluation of alpha=1 without tanking the Jupyter session --- .../Resources/MessagingUtilities.wl | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/WolframLanguageForJupyter/Resources/MessagingUtilities.wl b/WolframLanguageForJupyter/Resources/MessagingUtilities.wl index 40f68db..b2e0b89 100644 --- a/WolframLanguageForJupyter/Resources/MessagingUtilities.wl +++ b/WolframLanguageForJupyter/Resources/MessagingUtilities.wl @@ -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 ] ]; ];