<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.7.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "JavaScriptCore",
  "identifier" : "/documentation/JavaScriptCore/JSValueMakeFromJSONString(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "JavaScriptCore"
    ],
    "preciseIdentifier" : "c:@F@JSValueMakeFromJSONString"
  },
  "title" : "JSValueMakeFromJSONString(_:_:)"
}
-->

# JSValueMakeFromJSONString(_:_:)

Creates a JavaScript value from a JSON-formatted string.

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

## Parameters

`ctx`

The execution context to use.

`string`

The [`JSStringRef`](/documentation/JavaScriptCore/JSStringRef) that contains the JSON string to parse.

## Return Value

A [`JSValueRef`](/documentation/JavaScriptCore/JSValueRef) that contains the parsed value, or `NULL` if the input is invalid.

## Discussion

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)