protected function prepare_property_for_json( $property ) {
		// Only real property objects and not properties that are disabled.
		if ( ! papi_is_property( $property ) || $property->disabled() ) {
			return false;
		}

		$options = clone $property->get_options();

		if ( isset( $options->settings->items ) ) {
			foreach ( $options->settings->items as $index => $property ) {
				if ( is_array( $property ) && isset( $property['items'] ) ) {
					foreach ( $property['items'] as $child_index => $child_property ) {
						$options->settings->items[$index]['items'][$child_index] = $this->prepare_property_for_json( $child_property );
					}
				}

				if ( $property = $this->prepare_property_for_json( $property ) ) {
					$options->settings->items[$index] = $property;
				}
			}
		}

		return $options;
	}