---
title: "JSValueMakeFromJSONString(_:_:)"
framework: javascriptcore
role: symbol
role_heading: Function
path: "javascriptcore/jsvaluemakefromjsonstring(_:_:)"
---

# JSValueMakeFromJSONString(_:_:)

Creates a JavaScript value from a JSON-formatted string.

## Declaration

```swift
func JSValueMakeFromJSONString(_ ctx: JSContextRef!, _ string: JSStringRef!) -> JSValueRef!
```

## Parameters

- `ctx`: The execution context to use.
- `string`: The doc://com.apple.javascriptcore/documentation/JavaScriptCore/JSStringRef that contains the JSON string to parse.

## Return Value

Return Value A JSValueRef that contains the parsed value, or NULL if the input is invalid.

## See Also

### Converting to and from JSON-Formatted Strings

- [JSValueCreateJSONString(_:_:_:_:)](javascriptcore/jsvaluecreatejsonstring(_:_:_:_:).md)
