Overview

Namespaces

  • Baguette
    • Application
    • Response
    • Serializer
    • Session

Classes

  • PhpJsonSerializer

Interfaces

  • SerializerInterface
  • Overview
  • Namespace
  • Class

Class PhpJsonSerializer

JSON Serializer based on PHP JSON module

Baguette\Serializer\PhpJsonSerializer implements Baguette\Serializer\SerializerInterface
Final
Namespace: Baguette\Serializer
Copyright: 2016 Baguette HQ
License: Apache-2.0
Author: USAMI Kenta tadsan@zonu.me
Link: http://php.net/manual/book.json.php
Located at Serializer/PhpJsonSerializer.php
Methods summary
public
# __construct( integer $json_encode_option = null )

Parameters

$json_encode_option

Link

http://php.net/manual/json.constants.php
public
# setEmptyAsObject( boolean $value = true )

Parameters

$value

Returns


$this
public string
# getContentType( )

Returns

string

Implementation of

Baguette\Serializer\SerializerInterface::getContentType()
public string|false
# serialize( mixed $value )

Parameters

$value

Returns

string|false

Throws

DomainException

Link

http://php.net/manual/function.json-encode.php
http://php.net/manual/function.json-last-error.php

Implementation of

Baguette\Serializer\SerializerInterface::serialize()
Constants summary
string CONTENT_TYPE
# 'application/json; charset=utf-8'
Properties summary
public integer $json_encode_option
#
public boolean $empty_as_object
#
ξ ^ω^)ξ < Baguette Not Framework API documentation generated by ApiGen