0

PHP 怎样将 json 转换为Class对象?

sharon created at6 years ago view count: 2713

用了个jsonmapper( https://github.com/cweiske/jsonmapper )的库可以将json 转换为对应Class的Object, 不过这个修改类还是要手动去写。

有没有什么像Java JsonSchema2pojo ( https://github.com/joelittlejohn/jsonschema2pojo )的工具。

report
回复
0

可以写个工具把JAVA代码转换为PHP代码。

6 years ago 回复
0

这个库可以将json schema转换为Class。 https://github.com/mpmontanez/json-schema-to-php-generator

json schema 文档:http://json-schema.org/documentation.html

6 years ago 回复

Recent search keywords