<!DOCTYPE html><!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]--><!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]--><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Features — APIJSON Docs 1.0.0 documentation</title><script type="text/javascript" src="../_static/js/modernizr.min.js"></script><script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script><script type="text/javascript" src="../_static/jquery.js"></script><script type="text/javascript" src="../_static/underscore.js"></script><script type="text/javascript" src="../_static/doctools.js"></script><script type="text/javascript" src="../_static/language_data.js"></script><script type="text/javascript" src="../_static/contentui.js"></script><script type="text/javascript" src="../_static/js/theme.js"></script><link rel="stylesheet" href="../_static/css/theme.css" type="text/css" /><link rel="stylesheet" href="../_static/pygments.css" type="text/css" /><link rel="stylesheet" href="../_static/css/custom.css" type="text/css" /><link rel="stylesheet" href="../_static/contentui.css" type="text/css" /><link rel="index" title="Index" href="../genindex.html" /><link rel="search" title="Search" href="../search.html" /><link rel="next" title="Server-side Deployment" href="server_deployment/server_deployment.html" /><link rel="prev" title="About APIJSON" href="introduction.html" /></head><body class="wy-body-for-nav"><div class="wy-grid-for-nav"><nav data-toggle="wy-nav-shift" class="wy-nav-side"><div class="wy-side-scroll"><div class="wy-side-nav-search" ><a href="../index.html" class="icon icon-home"> APIJSON Docs</a><div role="search"><form id="rtd-search-form" class="wy-form" action="../search.html" method="get"><input type="text" name="q" placeholder="Search docs" /><input type="hidden" name="check_keywords" value="yes" /><input type="hidden" name="area" value="default" /></form></div></div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation"><p class="caption"><span class="caption-text">Quick Start</span></p><ul class="current"><li class="toctree-l1"><a class="reference internal" href="introduction.html">About APIJSON</a></li><li class="toctree-l1 current"><a class="current reference internal" href="#">Features</a><ul><li class="toctree-l2"><a class="reference internal" href="#examples">Examples</a></li></ul></li><li class="toctree-l1"><a class="reference internal" href="server_deployment/server_deployment.html">Server-side Deployment</a></li><li class="toctree-l1"><a class="reference internal" href="client_deployment/client_deployment.html">Client-side Deployment</a></li></ul><p class="caption"><span class="caption-text">Documentation</span></p><ul><li class="toctree-l1"><a class="reference internal" href="../documentation/design_rules.html">API design style guide</a></li><li class="toctree-l1"><a class="reference internal" href="../documentation/why.html">How does APIJSON works?</a></li><li class="toctree-l1"><a class="reference internal" href="../documentation/what_achieved.html">What APIJSON has achieved?</a></li></ul></div></div></nav><section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="top navigation"><i data-toggle="wy-nav-top" class="fa fa-bars"></i><a href="../index.html">APIJSON Docs</a></nav><div class="wy-nav-content"><div class="rst-content"><div role="navigation" aria-label="breadcrumbs navigation"><ul class="wy-breadcrumbs"><li><a href="../index.html">Docs</a> »</li><li>Features</li><li class="wy-breadcrumbs-aside"><a href="../_sources/quick_start/features.rst.txt" rel="nofollow"> View page source</a></li></ul><hr/></div><div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"><div itemprop="articleBody"><div class="section" id="features"><h1>Features<a class="headerlink" href="#features" title="Permalink to this headline">¶</a></h1><p><strong>For API developers:</strong></p><ul class="simple"><li><p>APIJSON largely reduces API developers’ workload by reducing most API protocals design work and documentation work.</p></li><li><p>APIJSON supports automatic permission verification, version management and SQL injection prevention. The API has no version, so developers no longer need to worry about the update of API protocals or the derivative documentation update.</p></li><li><p>With these features, it saves communication time between front-end and back-end developers about the API design.</p></li></ul><p><strong>For users:</strong></p><ul class="simple"><li><p>You can get many resources and different forms of data by making just a single request While typical REST APIs require loading from multiple URLs. Being convenient and flexible, it saves sending multiple requests with multiple API endpoints.</p></li><li><p>It provides CRUD(read and write), Fuzzy Search, Remote Method Invocation (RMI), etc. Other features include saving duplicate data, checking request history, etc.</p></li></ul><div class="section" id="examples"><h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2><p>APIJSON is organized by json objects not endpoints. The client can access full capabilities of the data from a single endpoint. To send a request, the basic structure is :</p><p><strong>baseURL / Methods(GET,GETS,POST,etc.) / JSONObject query</strong></p><p>The following example shows how to query a user’s information.</p><p><strong>Get a user:</strong></p><p>Request</p><div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="nt">"User"</span><span class="p">:{</span><span class="p">}</span><span class="p">}</span></pre></div></div><p>Response</p><div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="nt">"User"</span><span class="p">:{</span><span class="nt">"id"</span><span class="p">:</span><span class="mi">38710</span><span class="p">,</span><span class="nt">"sex"</span><span class="p">:</span><span class="mi">0</span><span class="p">,</span><span class="nt">"name"</span><span class="p">:</span><span class="s2">"TommyLemon"</span><span class="p">,</span><span class="nt">"certified"</span><span class="p">:</span><span class="kc">true</span><span class="p">,</span><span class="nt">"tag"</span><span class="p">:</span><span class="s2">"Android&Java"</span><span class="p">,</span><span class="nt">"phone"</span><span class="p">:</span><span class="mi">13000038710</span><span class="p">,</span><span class="nt">"head"</span><span class="p">:</span><span class="s2">"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000"</span><span class="p">,</span><span class="nt">"date"</span><span class="p">:</span><span class="mi">1485948110000</span><span class="p">,</span><span class="nt">"pictureList"</span><span class="p">:[</span><span class="s2">"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000"</span><span class="p">,</span><span class="s2">"http://common.cnblogs.com/images/icon_weibo_24.png"</span><span class="p">]</span><span class="p">},</span><span class="nt">"code"</span><span class="p">:</span><span class="mi">200</span><span class="p">,</span><span class="nt">"msg"</span><span class="p">:</span><span class="s2">"success"</span><span class="p">}</span></pre></div></div><p><a class="reference external" href="http://apijson.cn:8080/get/{"User":{}}">Try it yourself</a></p><p>The following example shows the query of getting three users’ <code class="code docutils literal notranslate"><span class="pre">id</span></code> and <code class="code docutils literal notranslate"><span class="pre">name</span></code>.</p><p><strong>Get an array of users</strong></p><p>Request</p><div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="nt">"[]"</span><span class="p">:{</span><span class="nt">"count"</span><span class="p">:</span><span class="mi">3</span><span class="p">,</span><span class="nt">"User"</span><span class="p">:{</span><span class="nt">"@column"</span><span class="p">:</span><span class="s2">"id,name"</span><span class="p">}</span><span class="p">}</span><span class="p">}</span></pre></div></div><p>Response</p><div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="nt">"[]"</span><span class="p">:[</span><span class="p">{</span><span class="nt">"User"</span><span class="p">:{</span><span class="nt">"id"</span><span class="p">:</span><span class="mi">38710</span><span class="p">,</span><span class="nt">"name"</span><span class="p">:</span><span class="s2">"TommyLemon"</span><span class="p">}</span><span class="p">},</span><span class="p">{</span><span class="nt">"User"</span><span class="p">:{</span><span class="nt">"id"</span><span class="p">:</span><span class="mi">70793</span><span class="p">,</span><span class="nt">"name"</span><span class="p">:</span><span class="s2">"Strong"</span><span class="p">}</span><span class="p">},</span><span class="p">{</span><span class="nt">"User"</span><span class="p">:{</span><span class="nt">"id"</span><span class="p">:</span><span class="mi">82001</span><span class="p">,</span><span class="nt">"name"</span><span class="p">:</span><span class="s2">"Android"</span><span class="p">}</span><span class="p">}</span><span class="p">],</span><span class="nt">"code"</span><span class="p">:</span><span class="mi">200</span><span class="p">,</span><span class="nt">"msg"</span><span class="p">:</span><span class="s2">"success"</span><span class="p">}</span></pre></div></div><p><a class="reference external" href="http://apijson.cn:8080/get/{"[]":{"count":3,"User":{"@column":"id,name"}}}">Try it yourself</a></p><p><a class="reference external" href="http://apijson.cn/">Test it online</a></p><img alt="https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Auto_get.jpg" src="https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Auto_get.jpg" /><div class="line-block"><div class="line"><br /></div></div><img alt="https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Auto_code.jpg" src="https://raw.githubusercontent.com/TommyLemon/StaticResources/master/APIJSON_Auto_code.jpg" /></div></div></div></div><footer><div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"><a href="server_deployment/server_deployment.html" class="btn btn-neutral float-right" title="Server-side Deployment" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a><a href="introduction.html" class="btn btn-neutral float-left" title="About APIJSON" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a></div><hr/><div role="contentinfo"><p>© Copyright 2019, Ruoran Wang</p></div>Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.</footer></div></div></section></div><script type="text/javascript">jQuery(function () {SphinxRtdTheme.Navigation.enable(true);});</script></body></html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。