fix clean json
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
name = "GeneralUtils"
|
name = "GeneralUtils"
|
||||||
uuid = "c6c72f09-b708-4ac8-ac7c-2084d70108fe"
|
uuid = "c6c72f09-b708-4ac8-ac7c-2084d70108fe"
|
||||||
version = "0.4.8"
|
version = "0.4.9"
|
||||||
authors = ["tonaerospace <tonaerospace.etc@gmail.com>"]
|
authors = ["tonaerospace <tonaerospace.etc@gmail.com>"]
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|||||||
+1
-1
@@ -545,7 +545,7 @@ julia> clean_json_response(text)
|
|||||||
```
|
```
|
||||||
"""
|
"""
|
||||||
function clean_json_response(text::String)
|
function clean_json_response(text::String)
|
||||||
removelist = ["{", "}", "```", "json"]
|
removelist = ["{", "}", "```", "json", "\n"]
|
||||||
for i in removelist
|
for i in removelist
|
||||||
while occursin(i, text)
|
while occursin(i, text)
|
||||||
text = replace(text, i => "")
|
text = replace(text, i => "")
|
||||||
|
|||||||
Reference in New Issue
Block a user