<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Field; use ModStart\Core\Exception\BizException; class JsonKeyValue extends AbstractField { protected $width = 200; public function unserializeValue($mdHu1, AbstractField $Mk6lP) { return @json_decode($mdHu1, true); } public function serializeValue($mdHu1, $DRh9Q) { return json_encode($mdHu1, JSON_UNESCAPED_UNICODE); } public function prepareInput($mdHu1, $DRh9Q) { goto btQrp; G9MFh: BizException::throwsIf($this->label . ' ' . L('Json Format Error'), $mdHu1 && null === $L3_o5); goto wCEuY; btQrp: $L3_o5 = @json_decode($mdHu1, true); goto G9MFh; wCEuY: return $L3_o5; goto EQHHl; EQHHl: } }