# Webresponse and spaces contained in json response fields

**URL:** <https://forum.xojo.com/t/webresponse-and-spaces-contained-in-json-response-fields/79560>\
**Category:** Web\
**Created:** [March 12, 2024, 9:25pm UTC](https://forum.xojo.com/t/webresponse-and-spaces-contained-in-json-response-fields/79560 "2024-03-12T21:25:17Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![jury\_buono1](https://forum.xojo.com/user_avatar/forum.xojo.com/jury_buono1/32/17255_2.png) [@jury\_buono1](https://forum.xojo.com/u/jury_buono1)\
**Post date:** [March 12, 2024, 9:25pm UTC](https://forum.xojo.com/t/webresponse-and-spaces-contained-in-json-response-fields/79560/1 "2024-03-12T21:25:17Z")

</div>

if I create a webservice that returns a json item whose fields that cointains spaces,  
the json content will be result malformed (iin a random position but always near to a space character ) to the parser that interprets it

you can try with this code in handleurl of webapp session

if Request.Path=“test” then

dim dic as Dictionary  
dim jout as new JSONItem  
dim dataOggi as datetime =DateTime.Now  
dim i as Integer

jout.Compact=false

for i= 0 to 100  
dic=new Dictionary  
dic.Value(“label1”)=“OK”  
dic.Value(“label2”)=“pre space1 space2 space3 space4 " + str(i)+” post space5 "  
dic.Value(“date”)= dataOggi  
jout.Add(dic)  
next i

response.Write(jout.ToString)  
response.Status=200  
return True

end if

if i parse the returned string in json online parses , the result is

Bad control character in string literal in JSON at line 2 column 0 (line 2 column 255)

Does anyone have solutions to this problem

---

<div class="post-metadata">

**Author:** ![Tim\_Parnell](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_parnell/32/161_2.png) [@Tim\_Parnell](https://forum.xojo.com/u/Tim_Parnell)\
**Post date:** [March 12, 2024, 9:36pm UTC](https://forum.xojo.com/t/webresponse-and-spaces-contained-in-json-response-fields/79560/2 "2024-03-12T21:36:03Z")

</div>

My advice is to not use Dictionary JSON functions for a plethora of “it’s just easier to use JSON item” reasons. Use strictly JSONItem for JSON i/o.

Barring that, maybe stick to one framework.

---

<div class="post-metadata">

**Author:** ![jury\_buono1](https://forum.xojo.com/user_avatar/forum.xojo.com/jury_buono1/32/17255_2.png) [@jury\_buono1](https://forum.xojo.com/u/jury_buono1)\
**Post date:** [March 12, 2024, 9:48pm UTC](https://forum.xojo.com/t/webresponse-and-spaces-contained-in-json-response-fields/79560/3 "2024-03-12T21:48:12Z")

</div>

i have converted code and the problem is the same

if Request.Path=“test” then

dim dic as Dictionary  
dim jout as new JSONItem  
dim dataOggi as datetime =DateTime.Now  
dim i as Integer

jout.Compact=false  
for i= 0 to 100  
dim j as new JSONItem  
'dic=new Dictionary  
j.Value(“label1”)=“OK”  
j.Value(“label2”)=“pre space1 space2 space3 space4 " + str(i)+” post space5 "  
j.Value(“date”)= dataOggi  
jout.Add(j)  
next i

response.Write(jout.ToString)  
response.Status=200  
return True

end if

the parsing of returned json item

[ { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 0 post space5 ", “date”: “2024-03-12 22:43:52” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 1 post space5 ", “date”: “2024-03-12 22:43:52” }, { “label1”: “OK”, “label2”:  
"pre space1 space2 space3 space4 2 post space5 ", “date”: “2024-03-12 22:43:52” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 3 post space5 ", “date”: “2024-03-12 22:43:52” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4  
4 post space5 ", “date”: “2024-03-12 22:43:52” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 5 post space5 ", “date” …

error :  
Invalid character ’ ’ at line 2 column 0

---

<div class="post-metadata">

**Author:** ![AlbertoD](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/dbc845/32.png) [@AlbertoD](https://forum.xojo.com/u/AlbertoD)\
**Post date:** [March 12, 2024, 10:15pm UTC](https://forum.xojo.com/t/webresponse-and-spaces-contained-in-json-response-fields/79560/4 "2024-03-12T22:15:41Z")

</div>

When code is pasted in this forum that is not formatted as code, is changed (for example the regular quotes are changed to curly ones). Also is hard to read most of the time.

Can you add ````` one row before/after your code to format it? or select all your code and use the icon:  
 ![image](https://forum.xojo.com/uploads/default/original/3X/5/5/55985f909415754c84d5af11c6a6d83415441de3.png)

If you can share a sample project it will be easier for someone to help.

Did you create the parser too? or what are you using to parse/interpret the json?

Using your code above (changing curly quotes) and pasting it to [jsonlint.com](http://jsonlint.com) it says that the JSON is valid.

* * *

Edit: this is the code used

```auto
If Request.Path="test" Then
  
  Dim dic As Dictionary
  Dim jout As New JSONItem
  Dim dataOggi As datetime =DateTime.Now
  Dim i As Integer
  
  jout.Compact=False
  For i= 0 To 100
    Dim j As New JSONItem
    'dic=new Dictionary
    j.Value("label1")="OK"
    j.Value("label2")="pre space1 space2 space3 space4 " + Str(i)+" post space5 "
    j.Value("date")= dataOggi
    jout.Add(j)
  Next i
  
  response.Write(jout.ToString)
  response.Status=200
  Return True
  
End If

```

---

<div class="post-metadata">

**Author:** ![jury\_buono1](https://forum.xojo.com/user_avatar/forum.xojo.com/jury_buono1/32/17255_2.png) [@jury\_buono1](https://forum.xojo.com/u/jury_buono1)\
**Post date:** [March 12, 2024, 10:29pm UTC](https://forum.xojo.com/t/webresponse-and-spaces-contained-in-json-response-fields/79560/5 "2024-03-12T22:29:47Z")

</div>

this is link to example code (debug port if webservice is 5556)

> **[xojo\_project: problem\_with\_spaces\_in\_webresponce.xojo\_project](https://files.fm/u/3k55f72skf)**
>
> Visit this link to download: problem\_with\_spaces\_in\_webresponce.xojo\_project

to check the output i have used online parser

> **[JSON Editor Online: edit JSON, format JSON, query JSON](https://jsoneditoronline.org/#left=local.cobila)**
>
> JSON Editor Online is a web-based tool to view, edit, format, repair, compare, query, transform, validate, and share your JSON data.

---

<div class="post-metadata">

**Author:** ![jury\_buono1](https://forum.xojo.com/user_avatar/forum.xojo.com/jury_buono1/32/17255_2.png) [@jury\_buono1](https://forum.xojo.com/u/jury_buono1)\
**Post date:** [March 12, 2024, 10:35pm UTC](https://forum.xojo.com/t/webresponse-and-spaces-contained-in-json-response-fields/79560/6 "2024-03-12T22:35:16Z")

</div>

> [@AlbertoD](#):
>
> If you can share a sample project it will be easier for someone to help.
> 
> Did you create the parser too? or what are you using to parse/interpret the json?
> 
> Using your code above (changing curly quotes) and pasting it to [jsonlint.com](http://jsonlint.com) it says that the JSON is valid.

the result of response is this and if i parse this on online parse it show a lot of errors

[ { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 0 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 1 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”:  
"pre space1 space2 space3 space4 2 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 3 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4  
4 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 5 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 6 post space5 ", “date”: “2024-03-12  
23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 7 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 8 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”,  
“label2”: "pre space1 space2 space3 space4 9 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 10 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2  
space3 space4 11 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 12 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 13 post space5  
", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 14 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 15 post space5 ", “date”: “2024-03-12 23:32:20”  
}, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 16 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 17 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”:  
"pre space1 space2 space3 space4 18 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 19 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4  
20 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 21 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 22 post space5 ", “date”: “2024-03-12  
23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 23 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 24 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”,  
“label2”: "pre space1 space2 space3 space4 25 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 26 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2  
space3 space4 27 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 28 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 29 post space5  
", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 30 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 31 post space5 ", “date”: “2024-03-12 23:32:20”  
}, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 32 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 33 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”:  
"pre space1 space2 space3 space4 34 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 35 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4  
36 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 37 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 38 post space5 ", “date”: “2024-03-12  
23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 39 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 40 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”,  
“label2”: "pre space1 space2 space3 space4 41 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 42 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2  
space3 space4 43 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 44 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 45 post space5  
", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 46 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 47 post space5 ", “date”: “2024-03-12 23:32:20”  
}, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 48 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 49 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”:  
"pre space1 space2 space3 space4 50 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 51 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4  
52 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 53 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 54 post space5 ", “date”: “2024-03-12  
23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 55 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 56 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”,  
“label2”: "pre space1 space2 space3 space4 57 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 58 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2  
space3 space4 59 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 60 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 61 post space5  
", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 62 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 63 post space5 ", “date”: “2024-03-12 23:32:20”  
}, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 64 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 65 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”:  
"pre space1 space2 space3 space4 66 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 67 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4  
68 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 69 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 70 post space5 ", “date”: “2024-03-12  
23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 71 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 72 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”,  
“label2”: "pre space1 space2 space3 space4 73 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 74 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2  
space3 space4 75 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 76 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 77 post space5  
", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 78 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 79 post space5 ", “date”: “2024-03-12 23:32:20”  
}, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 80 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 81 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”:  
"pre space1 space2 space3 space4 82 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 83 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4  
84 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 85 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 86 post space5 ", “date”: “2024-03-12  
23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 87 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 88 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”,  
“label2”: "pre space1 space2 space3 space4 89 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 90 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2  
space3 space4 91 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 92 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 93 post space5  
", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 94 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 95 post space5 ", “date”: “2024-03-12 23:32:20”  
}, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 96 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 97 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”:  
"pre space1 space2 space3 space4 98 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4 99 post space5 ", “date”: “2024-03-12 23:32:20” }, { “label1”: “OK”, “label2”: "pre space1 space2 space3 space4  
100 post space5 ", “date”: “2024-03-12 23:32:20” } ]

---

<div class="post-metadata">

**Author:** ![AlbertoD](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/dbc845/32.png) [@AlbertoD](https://forum.xojo.com/u/AlbertoD)\
**Post date:** [March 12, 2024, 10:42pm UTC](https://forum.xojo.com/t/webresponse-and-spaces-contained-in-json-response-fields/79560/7 "2024-03-12T22:42:11Z")

</div>

To share a project you need to share as binary (with all external elements) or if you want to share a xojo\_project format, you need to zip everything. In other words, your download is not valid.

> [@jury\_buono1](#):
>
> the result of response is this and if i parse this on online parse it show a lot of errors

What options do you select on the [https://jsoneditoronline.org/](https://jsoneditoronline.org/) to see if I can get the same errors?  
I don’t see any errors from my output:  
 ![screencast2024-03-1217-39-22-ezgif.com-video-to-gif-converter (1)](https://forum.xojo.com/uploads/default/original/3X/3/c/3c3b7237b7f31d11b76fda6dfbd37ed535692e0f.gif)

---

<div class="post-metadata">

**Author:** ![jury\_buono1](https://forum.xojo.com/user_avatar/forum.xojo.com/jury_buono1/32/17255_2.png) [@jury\_buono1](https://forum.xojo.com/u/jury_buono1)\
**Post date:** [March 12, 2024, 10:44pm UTC](https://forum.xojo.com/t/webresponse-and-spaces-contained-in-json-response-fields/79560/8 "2024-03-12T22:44:18Z")

</div>

![image](https://forum.xojo.com/uploads/default/original/3X/4/f/4fd60f9cdaf669007be16450bc333c0ba3825192.png)

---

<div class="post-metadata">

**Author:** ![AlbertoD](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/dbc845/32.png) [@AlbertoD](https://forum.xojo.com/u/AlbertoD)\
**Post date:** [March 12, 2024, 10:49pm UTC](https://forum.xojo.com/t/webresponse-and-spaces-contained-in-json-response-fields/79560/9 "2024-03-12T22:49:27Z")

</div>

Can you tell me step by step what you did to add that text to that JSON Editor Online?  
Here is what I did:

- copy your code into a Xojo Web Project in App HandleURL
- run the code
- add /test to the URL (127.0.0.1:8080/test)
- select all the text from the browser
- copy/paste into [https://jsoneditoronline.org/](https://jsoneditoronline.org/)

no errors.

* * *

Edit: I ran this on mac, are you using Windows? What browser are you using?

---

<div class="post-metadata">

**Author:** ![jury\_buono1](https://forum.xojo.com/user_avatar/forum.xojo.com/jury_buono1/32/17255_2.png) [@jury\_buono1](https://forum.xojo.com/u/jury_buono1)\
**Post date:** [March 12, 2024, 11:01pm UTC](https://forum.xojo.com/t/webresponse-and-spaces-contained-in-json-response-fields/79560/10 "2024-03-12T23:01:39Z")

</div>

ok all, but to test webService i use an online service on this page (if you want there is a plugin to test the localhost)

> **[Online API Testing Tool | Test Your API Online](https://reqbin.com/)**
>
> ReqBin is the world's most popular online API testing tool for REST, SOAP, and HTTP APIs. Test your APIs right from your browser. No coding. No desktop app. See why 850,000 users use ReqBin for testing their APIs online!

the result is in this image, then i use the copy button and past the result on online parser

 ![image](https://forum.xojo.com/uploads/default/original/3X/a/0/a0ea34c26c22a397f8656de7843d0838b6f7fb31.png)

---

<div class="post-metadata">

**Author:** ![jury\_buono1](https://forum.xojo.com/user_avatar/forum.xojo.com/jury_buono1/32/17255_2.png) [@jury\_buono1](https://forum.xojo.com/u/jury_buono1)\
**Post date:** [March 12, 2024, 11:27pm UTC](https://forum.xojo.com/t/webresponse-and-spaces-contained-in-json-response-fields/79560/11 "2024-03-12T23:27:58Z")

</div>

i use windows 10 and chrome

---

<div class="post-metadata">

**Author:** ![AlbertoD](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/dbc845/32.png) [@AlbertoD](https://forum.xojo.com/u/AlbertoD)\
**Post date:** [March 12, 2024, 11:55pm UTC](https://forum.xojo.com/t/webresponse-and-spaces-contained-in-json-response-fields/79560/12 "2024-03-12T23:55:18Z")

</div>

It looks like Reqbin changes some hex 20 to hex 0A (I don’t know why).

What I did is:

- access Reqbin
- install Chrome extension to test locally
- copy the result
- paste to json editor online
- click ‘show me’  
 ![image](https://forum.xojo.com/uploads/default/original/3X/2/4/24eff17f01410ec3a9c2f7d6a1a58233abd8d31c.png)
- check where the error is  
 ![image](https://forum.xojo.com/uploads/default/original/3X/5/b/5b7918a5db3043d4d10232ffff926d20501c4565.png)
- paste the text in a Xojo TextArea
- put a break point and check as Binary  
 ![image](https://forum.xojo.com/uploads/default/original/3X/d/3/d347464204461861daa206a092012accb4e8f045.png)

see how ‘space4 3 po’ has both hex 20 for the space and ‘space4 4 pos’ has hex 0A for one and 20 for the other?

I don’t think this is Xojo’s fault as I can copy the browser result directly and have no errors. I don’t have the time right now to build a test Web application and query it directly with Json Editor Online with the option ‘Open from url’ :  
 ![image](https://forum.xojo.com/uploads/default/original/3X/8/3/83ee05a56a783d57a11604954b813c423f769ec4.png)  
maybe you can do that test?

---

<div class="post-metadata">

**Author:** ![jury\_buono1](https://forum.xojo.com/user_avatar/forum.xojo.com/jury_buono1/32/17255_2.png) [@jury\_buono1](https://forum.xojo.com/u/jury_buono1)\
**Post date:** [March 13, 2024, 12:01am UTC](https://forum.xojo.com/t/webresponse-and-spaces-contained-in-json-response-fields/79560/13 "2024-03-13T00:01:03Z")

</div>

I try

---

<div class="post-metadata">

**Author:** ![jury\_buono1](https://forum.xojo.com/user_avatar/forum.xojo.com/jury_buono1/32/17255_2.png) [@jury\_buono1](https://forum.xojo.com/u/jury_buono1)\
**Post date:** [March 13, 2024, 12:59am UTC](https://forum.xojo.com/t/webresponse-and-spaces-contained-in-json-response-fields/79560/14 "2024-03-13T00:59:34Z")

</div>

you’re right,  
it’s the copy/ paste from reqbin that introduces the problem, I tried with various json parsers and the load from url and everything seems ok,

thanks so much for the help
