clojure - 用于无 UI 网络服务的 Compojure 或 Noir?

标签 clojure compojure noir

如果计划创建一个无 UI 的 Web 服务(接收 JSON 和/或 XML,返回 JSON 和/或 XML),是否 Noir提供任何有用的东西 Compojure ?

最佳答案

我相信 Noir 使使用 noir.response/json 创建 JSON 响应变得更简单一些。 :http://ibdknox.github.com/noir/noir.response-api.html#noir.response/json

另一方面,Noir 中的 JSON 支持只是围绕 clj-json 的一个非常薄的包装器(基本上只添加了 json 内容类型 header ),因此您可以直接使用 clj-json 而不是 Noir 用于此目的。

关于clojure - 用于无 UI 网络服务的 Compojure 或 Noir?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9297041/

相关文章:

clojure - 在 clojure 命令行应用程序中获取 'Attempting to call unbound fn'

clojure - Clojure 中的分页

heroku - 如何在 Heroku 中获取当前主机名

file - 将一个非常大的文本文件读入 clojure 中的列表

list - 验证列表的所有元素是否相等

sql - 使用 Clojure 连接到 Microsoft SQL Server

clojure - Ring 和 Compojure - 内容类型为 application/json 的 POST 请求不起作用

authentication - 在单页Clojure Web应用程序中使用Friend进行身份验证和授权

clojure - eclipse 下的黑色和莱因