circe/circe
GitHub: circe/circe
Circe 是为 Scala 与 Scala.js 提供高性能、安全易用的函数式 JSON 编解码解决方案。
Stars: 2534 | Forks: 545
# circe
[](https://github.com/circe/circe/actions)
[](https://codecov.io/github/circe/circe)

[](https://discord.gg/XF3CXcMzqD)
circe 是 Scala(以及 [Scala.js][scala-js])的 JSON 库。
请参阅 [指南](https://circe.github.io/circe/) 了解 circe 存在的原因以及如何使用它。
### 采用者
你正在使用 circe 吗?请考虑提交一个拉取请求,将你的组织添加到此列表中:
* [Abacus](https://abacusprotocol.com/)
* [Anduin Transactions](https://anduintransact.com/)
* [Apollo Agriculture](https://apolloagriculture.com/)
* [AutoScout24](https://www.autoscout24.com/)
* [Babylon Health](https://www.babylonhealth.com/)
* [Banno inside of Jack Henry](https://banno.com/)
* [BBC](http://www.bbc.co.uk)
* [Broad Institute](https://www.broadinstitute.org/data-sciences-platform)
* [Chartboost](https://www.chartboost.com/) (每秒在我们的广告交换上发送数十万条消息)
* [CiBO Technologies](http://www.cibotechnologies.com) (使用 circe 对数据进行(反)序列化,以支持农业领域的可持续发展革命)
* [ClearScore](https://www.clearscore.com)
* [Codacy](https://www.codacy.com)
* [Colisweb](https://www.colisweb.com)
* [Connio](https://www.connio.com) (使用 Circe 和 Akka 创建和管理数字孪生)
* [Coya](https://www.coya.com/)
* [Criteo](https://www.criteo.com/) ([从我们的广告横幅收集每秒 200,000 个事件](https://medium.com/criteo-labs/migrate-a-service-getting-200kqps-from-jackson-to-circe-a475b2718206))
* [Dassault Systèmes](https://www.3ds.com/)
* [Datalogue](https://datalogue.io)
* [Dreamlines](https://www.dreamlines.com/)
* [DriveTribe](https://drivetribe.com)
* [Earnest](https://www.earnest.com)
* [Elastic](https://www.elastic.co)
* [Emmy Sharing](https://emmy-sharing.de/en/)
* [FOLIO](https://folio-sec.com/)
* [GLNGN Server](https://glngn.com)
* [Gympass](https://www.gympass.com/)
* [Gutefrage](https://www.gutefrage.net)
* [Hello Soda](https://hellosoda.com/)
* [HERE Technologies](https://www.here.com/)
* [Hireproof](https://hireproof.io/)
* [HolidayCheck](https://www.holidaycheck.de)
* [ImmobilienScout24](https://www.immobilienscout24.de/)
* [Immozentral](https://www.immozentral.com/)
* [Indix](https://www.indix.com)
* [ITV](https://www.itv.com/)
* [Kinoplan](https://kinoplan.ru/)
* [Latitude Financial Services](https://www.latitudefinancial.com.au/)
* [MatchesFashion](https://www.matchesfashion.com)
* [Merit](https://merits.com)
* [Metacommerce](https://www.metacommerce.ru)
* [Mobile GmbH](https://www.mobile.de)
* [MomentFeed](https://momentfeed.com)
* [New Work](https://www.new-work.se/en/)
* [Nike](https://www.nike.com)
* [Ocado Technology](https://ocadotechnology.com)
* [On Air Entertainment](https://onairentertainment.com/)
* [Onfocus](https://onfocus.io)
* [Opt Technologies](https://opt-technologies.jp/)
* [OVO Energy](https://www.ovoenergy.com)
* [Panaseer](https://panaseer.com)
* [Permutive](http://permutive.com)
* [Prezi](https://prezi.com)
* [Project September](http://www.projectseptember.com) (使用 circe 在平台内交换和存储数据,并使用 Sangria 通过 GraphQL 提供服务)
* [Raster Foundry](https://github.com/raster-foundry/raster-foundry/)
* [Ravel Law](http://ravellaw.com/technology/) (使用 circe 对数千万份法律意见进行(反)序列化,用于搜索、分析和可视化)
* [REA Group - realestate.com.au](https://www.realestate.com.au/)
* [Reonomy](https://reonomy.com/)
* [Resilient plc](https://resilientplc.com/)
* [Sky](https://www.sky.com/)
* [Snowplow Analytics](https://snowplowanalytics.com/)
* [SoundCloud](https://www.soundcloud.com) (每小时在 MapReduce ETL 中转换 200,000,000 个 JSON 事件)
* [Spotify](https://www.spotify.com) (在 [Scio][scio] 中使用 circe 进行 JSON IO)
* [SpotX](https://www.spotx.tv/)
* [Stripe](https://stripe.com)
* [Stylight](https://stylight.de)
* [TabMo](http://tabmo-group.io/) (使用 Akka Stream 和 Spark 每秒解析超过 100,000 个事件)
* [Tinkoff](https://tinkoff.ru/)
* [The Guardian](https://www.theguardian.com)
* [Threat Stack](https://www.threatstack.com/)
* [Tranzzo](https://tranzzo.com/)
* [Twilio](https://www.twilio.com) (每天使用 Circe 和 Akka 发送数百万条消息)
* [Uberall](https://stackshare.io/uberall/uberall)
* [VEACT](https://veact.net/)
* [WeWork](https://www.wework.com)
* [Whisk](https://whisk.com)
* [Wide Angle Analytics](https://wideangle.co)
* [Zalando](https://zalando.de)
* [Zendesk](https://zendesk.com)
### 其他 circe 组织项目
请在 [Gitter][gitter] 上联系我们,如果你有与 circe 相关的项目并希望讨论将其托管在
[circe 组织][circe-org] 上。
* [circe-benchmarks][circe-benchmarks]: 用于比较 circe 与其他 JSON 库在 JVM 上性能的基准测试。
* [circe-config][circe-config]: 用于在 HOCON、Java 属性和 JSON 文档之间进行转换的库。
* [circe-derivation][circe-derivation]: 实验性的泛型推导,具有改进的编译时间。
* [circe-fs2][circe-fs2]: 基于 [fs2][fs2] 和 [Jawn][jawn] 提供的流式 JSON 解析和解码库。
* [circe-iteratee][circe-iteratee]: 基于 [iteratee.io][iteratee] 和 [Jawn][jawn] 提供的流式 JSON 解析和解码库。
* [circe-jackson][circe-jackson]: 提供 [Jackson][jackson] 支持的解析和打印功能。
* [circe-spray][circe-spray]: 提供基于 [Spray][spray] 使用的 circe 的 JSON 序列化和反序列化库。
* [circe-yaml][circe-yaml]: 使用 [SnakeYAML][snakeyaml] 支持解析 YAML 1.1 到 circe 的 `Json`。
* [circe-refined][circe-refined]: 提供使用 [Refined][refined] 的编码器和解码器。
### 相关项目
以下开源项目要么基于 circe,要么提供 circe 支持:
* [Actor Messenger][actor-im]: 即时通讯平台
* [akka-http-json][akka-http-json]: 支持在 [Akka HTTP][akka-http] 中使用 circe 进行 JSON 序列化和反序列化的库。
* [akka-stream-json][akka-stream-json]: 为基于流的应用程序提供 JSON 支持,使用 Jawn 作为解析器,并附带 circe 示例。
* [Argus][argus]: 从 JSON 模式生成模型和 circe 编码器和解码器。
* [Blackdoor JOSE][jose-json-circe]: circe 对 blackdoor JOSE 和 JWT 的 JSON 支持。
* [borer][borer]: 允许 circe 编码器/解码器被重用用于 CBOR(反)序列化。
* [circe-debezium][circe-debezium]: Circe 编解码器用于 [Debezium][debezium] 负载类型。
* [circe-geojson][circe-geojson]: Circe 对 GeoJSON (RFC 7946) 的支持。
* [circe-kafka][circe-kafka]: 将 Encoder 和 Decoder 隐式转换为 Kafka 序列化器/反序列化器/Serde。
* [cornichon][cornichon]: 用于 JSON API 测试的 DSL。
* [Cosmos][cosmos]: 一个用于 [DCOS][dcos] 服务的 API,使用 circe。
* [crjdt][crjdt]: Scala 中的冲突可复现 JSON 数据类型。
* [diffson][diffson]: 用于 JSON 的 Scala 差异/补丁库。
* [elastic4s][elastic4s]: 支持 circe 的 Scala 客户端用于 [Elasticsearch][elasticsearch]。
* [Enumeratum][enumeratum]: Scala 枚举类型,支持与 circe 集成。
* [Featherbed][featherbed]: 支持 circe 的 REST 客户端库。
* [Finch][finch]: 用于构建支持 circe 的 Web 服务的库。
* [fintrospect][fintrospect]: 用于 [Finagle][finagle] 的 HTTP 契约,支持 circe。
* [fluflu][fluflu]: 一个 [Fluentd][fluentd] 日志记录器。
* [Github4s][github4s]: 用 Scala 编写的 GitHub API 包装器。
* [content-api-models][guardian-content-api-models]: Guardian 的 Content API Thrift 模型。
* [http4s][http4s]: 一个纯粹用于客户端和服务器应用程序的函数式 HTTP 库。
* [IdeaLingua][izumi-r2]: 阶段接口定义和数据建模语言 & RPC 系统,当前目标为 Scala、Go、C# 和 TypeScript。Scala 代码生成使用 circe 生成模型和 JSON 编解码器。
* [Iglu Schema Repository][iglu]: 一个支持 circe 的 [JSON Schema][json-schema] 仓库。
* [jsactor][jsactor]: 一个支持 circe 的 Scala.js 演员库。
* [jsoniter-scala-circe][jsoniter-scala-circe]: 用于 circe AST 的更快解析/打印的助推器,以及对 `java.time._` 和 `BigInt` 类型的解码/编码。
* [jwt-circe][jwt-circe]: 一个支持 circe 的 [JSON Web Token][jwt] 实现。
* [kadai-log][kadai-log]: 支持 circe 的日志库。
* [msgpack4z-circe][msgpack4z-circe]: 支持 circe 的 [MessagePack][msgpack] 实现。
* [ohNoMyCirce][ohNoMyCirce]: 针对 [shapeless][shapeless] 的 Generic、[circe][circe-org] 的 Encoder & Decoder 和 [slick][slick] 的 case class 映射提供友好的编译错误信息。
* [pekko-http-json][pekko-http-json]: 支持在 [Pekko HTTP][pekko-http] 中使用 circe 进行 JSON 序列化和反序列化的库。
* [pekko-streams-circe][pekko-streams-circe]: 为基于流的应用程序提供 JSON 支持,使用 Jawn 作为解析器,并附带 circe 示例。
* [play-circe][play-circe]: circe 对 [Play!][play] 的支持。
* [pulsar4s](https://stackshare.io/uberall/uberall): 一个支持 circe 的 Apache-Pulsar Scala 客户端。
* [Rapture][rapture]: 支持在 Rapture JSON 中使用 circe 的解析和 AST。
* [roc][roc]: 基于 Finagle 的 PostgreSQL 客户端。
* [sangria-circe][sangria-circe]: Circe 的序列化支持,用于 [Sangria][sangria] 的 [GraphQL][graphql] 实现。
* [scalist][scalist]: 一个 [Todoist][todoist] API 客户端。
* [scala-jsonapi][scala-jsonapi]: Scala 支持库,用于将 JSON API 规范与 Spray、Play! 或 Circe 集成。
* [scala-json-rpc]: 用于 Scala 和 Scala.js 的 [JSON-RPC][json-rpc] 2.0 库。
* [scalatest-json-circe]: 针对 Json 的 Scalatest 匹配器,提供适当的相等性检查和描述性错误信息。
* [Scio][scio]: Apache Beam 和 Google Cloud Dataflow 的 Scala API,使用 circe 进行 JSON IO。
* [seals][seals]: 用于模式演进和语言集成模式(derives circe 编码器和解码器)的工具。
* [shaclex][shaclex]: 使用 SHACL 或 ShEx 进行 RDF 验证。
* [Slick-pg][slick-pg]: [Slick][slick] 的 PostgreSQL 扩展。
* [sttp][sttp]: Scala HTTP 客户端。
* [Synapses][synapses]: 一个轻量级的神经网络库,用于 js、jvm 和 .net。
* [telepooz][telepooz]: 基于 circe 的 [Telegram Bot API][telegram-bot-api] Scala 包装器。
* [Zenith][zenith]: 基于 circe 的函数式 HTTP 库。
### 示例
以下项目提供包含 circe 的示例、模板或基准测试:
* https://github.com/alanphillips78/akka-http-microservice-blueprint
* https://github.com/bneil/fcs_boilerplate
* https://github.com/gvolpe/simple-http4s-api
* https://github.com/vitorsvieira/akka-http-circe-json-template
* https://github.com/stephennancekivell/some-jmh-json-benchmarks-circe-jackson
* https://github.com/pauljamescleary/scala-pet-store
## 许可证
circe 根据 **[Apache License, Version 2.0][apache]**(
"许可证")授权;您不得在未遵守许可证的情况下使用本软件。
除非适用法律要求或书面同意,否则根据许可证分发的软件
按"原样"分发,不提供任何形式的明示或暗示的保证或条件。
请参阅许可证以了解管理权限和
限制的具体语言。
标签:ADT, API, circe, Either, JSON, JSON解析, Monad, Option, Scala, SOC Prime, Syscall, Web开发, 函子, 函数式编程, 反序列化, 序列化, 库, 应急响应, 开发工具, 开源, 技术栈, 指南, 数据交换, 文档, 案例类, 模式匹配, 类型安全, 类型推导, 编解码, 自动化资产收集, 适用性