<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>JSON API on PlumePHP</title><link>https://plumephp.com/tags/json-api/</link><description>Recent content in JSON API on PlumePHP</description><generator>Hugo</generator><language>zh-CN</language><lastBuildDate>Tue, 26 Mar 2024 09:37:00 +0800</lastBuildDate><atom:link href="https://plumephp.com/tags/json-api/index.xml" rel="self" type="application/rss+xml"/><item><title>Go JSON API 入门：Handler、请求解析和统一响应怎么组织</title><link>https://plumephp.com/go-http-json-api-structure-2024/</link><pubDate>Tue, 26 Mar 2024 09:37:00 +0800</pubDate><guid>https://plumephp.com/go-http-json-api-structure-2024/</guid><description>&lt;p&gt;Go 标准库写 JSON API 并不难，难的是写到第十个接口时还能保持清楚。很多初学项目一开始把所有逻辑塞进 handler：解析 JSON、校验字段、查数据库、拼响应、写错误。前两个接口还行，接口多了以后，错误格式不统一，测试也不好写。&lt;/p&gt;</description></item></channel></rss>