Title: WP_Customize_Control::json
Published: December 18, 2014
Last modified: April 28, 2025

---

# WP_Customize_Control::json(): array

## In this article

 * [Return](https://developer.wordpress.org/reference/classes/WP_Customize_Control/json/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/classes/WP_Customize_Control/json/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/WP_Customize_Control/json/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/classes/WP_Customize_Control/json/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/classes/WP_Customize_Control/json/?output_format=md#wp--skip-link--target)

Gets the data to export to the client via JSON.

## 󠀁[Return](https://developer.wordpress.org/reference/classes/WP_Customize_Control/json/?output_format=md#return)󠁿

 array Array of parameters passed to the JavaScript.

## 󠀁[Source](https://developer.wordpress.org/reference/classes/WP_Customize_Control/json/?output_format=md#source)󠁿

    ```php
    public function json() {
    	$this->to_json();
    	return $this->json;
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/class-wp-customize-control.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/class-wp-customize-control.php#L341)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/class-wp-customize-control.php#L341-L344)

## 󠀁[Related](https://developer.wordpress.org/reference/classes/WP_Customize_Control/json/?output_format=md#related)󠁿

| Uses | Description | 
| [WP_Customize_Control::to_json()](https://developer.wordpress.org/reference/classes/wp_customize_control/to_json/)`wp-includes/class-wp-customize-control.php` |

Refreshes the parameters passed to the JavaScript via JSON.

  |

| Used by | Description | 
| [WP_Customize_Code_Editor_Control::json()](https://developer.wordpress.org/reference/classes/wp_customize_code_editor_control/json/)`wp-includes/customize/class-wp-customize-code-editor-control.php` |

Refresh the parameters passed to the JavaScript via JSON.

  | 
| [WP_Customize_Date_Time_Control::json()](https://developer.wordpress.org/reference/classes/wp_customize_date_time_control/json/)`wp-includes/customize/class-wp-customize-date-time-control.php` |

Export data to JS.

  | 
| [WP_Customize_Nav_Menu_Item_Control::json()](https://developer.wordpress.org/reference/classes/wp_customize_nav_menu_item_control/json/)`wp-includes/customize/class-wp-customize-nav-menu-item-control.php` |

Return parameters for this control.

  | 
| [WP_Customize_Nav_Menu_Control::json()](https://developer.wordpress.org/reference/classes/wp_customize_nav_menu_control/json/)`wp-includes/customize/class-wp-customize-nav-menu-control.php` |

Return parameters for this control.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/WP_Customize_Control/json/?output_format=md#changelog)󠁿

| Version | Description | 
| [4.1.0](https://developer.wordpress.org/reference/since/4.1.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_customize_control%2Fjson%2F)
before being able to contribute a note or feedback.