> For the complete documentation index, see [llms.txt](https://olexsyn.gitbook.io/enote/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://olexsyn.gitbook.io/enote/progr/javascript/json/try.md).

# Try

спробуй...

Вам не нужен `cgi.FieldStorage`, просто прочитайте stdin:

```python
import sys
import json

data = json.load(sys.stdin)
```

на стороне клиента вы также должны преобразовать свои данные вручную в json-строку:

```javascript
$.ajax({
    url: "/city/cgi-bin/test1.py",
    type: "post",
    contentType: "application/json; charset=utf-8",
    dataType: "json",
    data: JSON.stringify({'lat':30.5 , 'lon' : 4.5}),
    success: function(response){
        //window.location="http://mycity.parseapp.com/city/cgi-bin/test1.py"
        console.log(response.message);
        console.log(response.keys);
        console.log(response.data);

    }
});
```
