Skip to content

Latest commit

 

History

History
15 lines (10 loc) · 318 Bytes

JsonxTypeEncoder.md

File metadata and controls

15 lines (10 loc) · 318 Bytes

JsonxTypeEncoder

<?php

use Chubbyphp\DecodeEncode\Encoder\JsonxTypeEncoder;

$encoderType = new JsonxTypeEncoder();

echo $encoderType->getContentType();
// 'application/jsonx+xml'

echo $encoderType->encode(['name' => 'php']);
// '<json:object><json:string name="name">php</json:string></json:object>'