定制 vitek-dev/nette-json-serializer 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

vitek-dev/nette-json-serializer

最新稳定版本:v1.2.0

Composer 安装命令:

composer require vitek-dev/nette-json-serializer

包简介

JSON-preconfigured symfony/serializer integration into Nette

README 文档

README

Preconfigured symfony/serializer for Nette Framework.

Features

  • Serialize and deserialize PHP objects to/from JSON
  • Handles nested objects and arrays (via PHPDoc annotations)
  • Enums support
  • Discriminators
  • Syntax sugar for Guzzle: Ability to directly deserialize MessageInterface/StreamInterface

Requirements

  • PHP 8.4 or higher

Installation

composer require vitek-dev/nette-json-serializer
extensions:
    vd.serializer: VitekDev\Serializer\DI\JsonSerializerExtension

Known issues

Class with no properties

Deserialization of class with no properties will end up with NotNormalizableValueException

class Garage {
    /**
     * @param Car[] $cars
     */
    public function __construct(
        public array $cars,
    ) {}
}

class Car {
    // No properties
}

统计信息

  • 总下载量: 234
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-08-04