> For the complete documentation index, see [llms.txt](https://osl.mistium.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://osl.mistium.com/legacy-osl-originos/prototype-helpers/.jsonparse-1.md).

# string.JsonParse

> ⚠️ **Not a method in the current OSL CLI.** Use the [`json` package](/packages/data/json.md) instead: `json.parse(value, {type: "object" | "array"})` returns a [`Result`](/packages/utilities/result.md).

## Replacement

```javascript
import "osl/json"

auto parsed = json.parse("{\"x\":10,\"y\":20}", {type: "object"})
if parsed.isOk() (
  object data = parsed.unwrap().assert(object)
  log data.x // 10
)
```
