Método que prepara la respuesta json a un arreglo.
423881
private function prepareOutput($json) {
    $decode = json_decode($json);
    $payment = array(
      'bill_id' => $decode->id,
      'list' => array(),
    );

    foreach ($decode->payments as $data) {
      $payment['list'][$id] = array(
        'link'        => $data->url,
        'mail'        => $data->email,
        'payment_id'  => $data->id,
      );
    }

    return $payment;
  }
996485
public function getJson()
    {
        $json = array(
            'urlKeyParam' => $this->getUrlKeyParam(),
            'inputFieldName' => $this->getTokenInputName(),
            'observedCssRules' => $this->getObservedCssRules(),
            'requestUrl' => $this->getTokenUrl(),
            'cookieName' => $this->getCookieName()
        );

        return json_encode($json);
    }
29367
def ConsultarOtrosImpuestos(self, sep="||"):
        ""
        ret = self.client.consultarOtrosImpuestos(
                        auth={
                            'token': self.Token, 'sign': self.Sign,
                            'cuit': self.Cuit, },
                            )['respuesta']
        self.__analizar_errores(ret)
        array = ret.get('otroImpuesto', [])
        if sep is None:
            return dict([(it['codigo'], it['descripcion']) for it in array])
        else:
            return [("%s %%s %s %%s %s" % (sep, sep, sep)) %
                    (it['codigo'], it['descripcion']) for it in array]
1339844
public function jsonSerialize() {
        $ret = parent::jsonSerialize();
        $ret->id = $this->id;
        $ret->logicalConnectorWithNext = $this->logicalConnectorWithNext;
        $ret->negation = $this->negation;
        $ret->groupedWith = $this->groupedWith;

        return $ret;
    }
381532
private function packageJSON() {
        return new JsonObject(
            trim(substr($this->stream, 0, ++$this->cursor)),
            ++$this->object_num
        );
    }
142431
def __analizar_evento(self, ret):
        ""
        evt = ret.get('evento')
        if evt:
            self.Eventos = [evt]
            self.Evento = "%(codigo)s: %(descripcion)s" % evt
1302246
public function jsonSerialize()
    {
        $r = [
            'message' => $this->getMessage(),
            'messageContainsHtml' => $this->messageContainsHtml(),
        ];
        if ($this->field) {
            $r['field'] = $this->field;
        }

        return $r;
    }
770278
public function getJson()
    {
        $dirty = $this->getDirty();
        if (count($dirty)) {
            $this->internal_original_value = $this->__toString();
        }

        return $this->internal_original_value;
    }
431463
public function minify($json){
			$tokenizer = "/\"|(\/\*)|(\*\/)|(\/\/)|\n|\r/";
			$in_string = false;
			$in_multiline_comment = false;
			$in_singleline_comment = false;
			$tmp; $tmp2; $new_str = array(); $ns = 0; $from = 0; $lc; $rc; $lastIndex = 0;
			while (preg_match($tokenizer,$json,$tmp,PREG_OFFSET_CAPTURE,$lastIndex)){
				$tmp = $tmp[0];
				$lastIndex = $tmp[1] + strlen($tmp[0]);
				$lc = substr($json,0,$lastIndex - strlen($tmp[0]));
				$rc = substr($json,$lastIndex);
				if (!$in_multiline_comment && !$in_singleline_comment){
					$tmp2 = substr($lc,$from);
					if (!$in_string){
						$tmp2 = preg_replace("/(\n|\r|\s)*/","",$tmp2);
					}
					$new_str[] = $tmp2;
				}
				$from = $lastIndex;
				if ($tmp[0] == "\"" && !$in_multiline_comment && !$in_singleline_comment){
					preg_match("/(\\\\)*$/",$lc,$tmp2);
					if (!$in_string || !$tmp2 || (strlen($tmp2[0]) % 2) == 0){ // start of string with ", or unescaped " character found to end string
						$in_string = !$in_string;
					}
					$from--; // include " character in next catch
					$rc = substr($json,$from);
				} else if ($tmp[0] == "/*" && !$in_string && !$in_multiline_comment && !$in_singleline_comment){
					$in_multiline_comment = true;
				} else if ($tmp[0] == "*/" && !$in_string && $in_multiline_comment && !$in_singleline_comment){
					$in_multiline_comment = false;
				} else if ($tmp[0] == "//" && !$in_string && !$in_multiline_comment && !$in_singleline_comment){
					$in_singleline_comment = true;
				} else if (($tmp[0] == "\n" || $tmp[0] == "\r") && !$in_string && !$in_multiline_comment && $in_singleline_comment){
					$in_singleline_comment = false;
				} else if (!$in_multiline_comment && !$in_singleline_comment && !(preg_match("/\n|\r|\s/",$tmp[0]))){
					$new_str[] = $tmp[0];
				}
			}
			$new_str[] = $rc;
			return implode("",$new_str);
		}
242919
def ConsultarLocalidades(self, cod_provincia, sep="||"):
        ""
        ret = self.client.consultarLocalidadesPorProvincia(
                        auth={
                            'token': self.Token, 'sign': self.Sign,
                            'cuit': self.Cuit, },
                        solicitud={'codProvincia': cod_provincia},
                            )['respuesta']
        self.__analizar_errores(ret)
        array = ret.get('localidad', [])
        if sep is None:
            return dict([(it['codigo'], it['descripcion']) for it in array])
        else:
            return [("%s %%s %s %%s %s" % (sep, sep, sep)) %
                    (it['codigo'], it['descripcion']) for it in array]
981361
public function toJson()
    {
        array_walk_recursive($this->params, function (&$value) {
            $value = (string) $value;
        });
        return json_encode($this->params);
    }
1282117
function(input) {

			var temp;

			// Si no hay parámetros

			if (!arguments.length) {

				// Construimos la URL con los atributos y la devolvemos como cadena de texto

				return Public.build(this._attributes, this.location);

			// Si el parámetro es `null`

			} else if (input === null) {

				// Vaciamos los atributos

				this._attributes = {};

			// Si el parámetro es una cadena de texto o un objecto

			} else if ((temp = typeof input) === 'string' || (input && temp === 'object')) {

				// Desmontamos la URL y guardamos su información en forma de objeto

				this._attributes = Public.unbuild(input, this.location);

			}

			return this;

		}
530809
function jsonSerialize(): \stdClass {
    $map = new \stdClass;
    $map->name = $this->getName();
    $map->source_digest = $this->getSourceDigest();
    $map->coverage = $this->getCoverage()->getArrayCopy();
    if (mb_strlen($source = $this->getSource())) $map->source = $source;
    return $map;
  }
137951
public function to_json() {
		parent::to_json();

		$this->json['palette']          = $this->palette;
		$this->json['choices']['alpha'] = ( isset( $this->choices['alpha'] ) && $this->choices['alpha'] ) ? 'true' : 'false';
		$this->json['mode']             = $this->mode;
		$this->json['defaultPalette']   = 			[
			[
				'name'  => esc_attr__( 'Pale Pink', 'kirki' ),
				'slug'  => 'pale-pink',
				'color' => '#f78da7',
			],
			[
				'name'  => esc_attr__( 'Vivid Red', 'kirki' ),
				'slug'  => 'vivid-red',
				'color' => '#cf2e2e',
			],
			[
				'name'  => esc_attr__( 'Luminous Vivid Orange', 'kirki' ),
				'slug'  => 'luminous-vivid-orange',
				'color' => '#ff6900',
			],
			[
				'name'  => esc_attr__( 'Luminous Vivid Amber', 'kirki' ),
				'slug'  => 'luminous-vivid-amber',
				'color' => '#fcb900',
			],
			[
				'name'  => esc_attr__( 'Light Green Cyan', 'kirki' ),
				'slug'  => 'light-green-cyan',
				'color' => '#7bdcb5',
			],
			[
				'name'  => esc_attr__( 'Vivid Green Cyan', 'kirki' ),
				'slug'  => 'vivid-green-cyan',
				'color' => '#00d084',
			],
			[
				'name'  => esc_attr__( 'Pale Cyan Blue', 'kirki' ),
				'slug'  => 'pale-cyan-blue',
				'color' => '#8ed1fc',
			],
			[
				'name'  => esc_html__( 'Vivid Cyan Blue', 'kirki' ),
				'slug'  => 'vivid-cyan-blue',
				'color' => '#0693e3',
			],
			[
				'name'  => esc_attr__( 'White', 'kirki' ),
				'slug'  => 'theme-white',
				'color' => '#fff',
			],
			[
				'name'  => esc_attr__( 'Very Light Gray', 'kirki' ),
				'slug'  => 'very-light-gray',
				'color' => '#eee',
			],
			[
				'name'  => esc_html__( 'Cyan Bluish Gray', 'kirki' ),
				'slug'  => 'cyan-bluish-gray',
				'color' => '#abb8c3',
			],
			[
				'name'  => esc_attr__( 'Blue Gray', 'kirki' ),
				'slug'  => 'blue-gray',
				'color' => '#546E7A',
			],
			[
				'name'  => esc_attr__( 'Very Dark Gray', 'kirki' ),
				'slug'  => 'very-dark-gray',
				'color' => '#313131',
			],
			[
				'name'  => esc_attr__( 'Black', 'kirki' ),
				'slug'  => 'theme-black',
				'color' => '#000',
			],
		];
	}
1107223
public static function createGrammar($json): Grammar
    {
        $array = json_decode($json, true);
        if (null === $array && 'null' !== $json) {
            throw new \InvalidArgumentException('JSON error: ' . json_last_error_msg());
        }
        if (!is_array($array)) {
            throw new \InvalidArgumentException('Incorrect JSON data');
        }

        return parent::createGrammar($array);
    }
327452
public function jsonSerialize()
    {
        $linestrings = [];

        foreach ($this->linestrings as $linestring) {
            $linestrings[] = $linestring->jsonSerialize();
        }

        return new \GeoJson\Geometry\MultiLineString($linestrings);
    }
758562
def GenerarRemito(self, id_req, archivo="qr.png"):
        ""
        if not self.remito['arrayContingencias']:
            del self.remito['arrayContingencias']
        response = self.client.generarRemito(
                                authRequest={'token': self.Token, 'sign': self.Sign, 'cuitRepresentada': self.Cuit},
                                idReq=id_req, remito=self.remito) 
        ret = response.get("generarRemitoReturn")
        if ret:
            self.__analizar_errores(ret)
            self.__analizar_observaciones(ret)
            self.__analizar_evento(ret)
            self.AnalizarRemito(ret, archivo)
        return bool(self.CodRemito)