All Projects → shootingfly → Jbuilder

shootingfly / Jbuilder

Licence: mit
Generate JSON objects with a Builder-style DSL, inspired by jbuilder

Programming Languages

crystal
512 projects

Projects that are alternatives of or similar to Jbuilder

Jasonelle
🛸 🏘️ Jasonelle issues, releases and discussions repository.
Stars: ✭ 240 (+548.65%)
Mutual labels:  json, framework
Neutralinojs
Portable and lightweight cross-platform desktop application development framework
Stars: ✭ 4,731 (+12686.49%)
Mutual labels:  json, framework
Php Curl Class
PHP Curl Class makes it easy to send HTTP requests and integrate with web APIs
Stars: ✭ 2,903 (+7745.95%)
Mutual labels:  json, framework
Goat
[DEPRECATED] 🐐 A minimalistic JSON API server in Go
Stars: ✭ 161 (+335.14%)
Mutual labels:  json, framework
Servicestack
Thoughtfully architected, obscenely fast, thoroughly enjoyable web services for all
Stars: ✭ 4,976 (+13348.65%)
Mutual labels:  json, framework
School
Sistema de gerenciamento para escola em Laravel com VueJS (Não é mais Angular)
Stars: ✭ 178 (+381.08%)
Mutual labels:  json, framework
Deepkit Framework
A new full-featured and high-performance web framework for sophisticated Typescript projects like complex admin interfaces, websites, games, desktop and mobile apps.
Stars: ✭ 307 (+729.73%)
Mutual labels:  json, framework
Facil.io
Your high performance web application C framework
Stars: ✭ 1,393 (+3664.86%)
Mutual labels:  json, framework
Zerocode
A community-developed, free, open source, microservices API automation and load testing framework built using JUnit core runners for Http REST, SOAP, Security, Database, Kafka and much more. Zerocode Open Source enables you to create, change, orchestrate and maintain your automated test cases declaratively with absolute ease.
Stars: ✭ 482 (+1202.7%)
Mutual labels:  json, framework
Ef.js
The timeless, future facing front-end framework
Stars: ✭ 385 (+940.54%)
Mutual labels:  framework, template-engine
Aeromock
Lightweight mock web application server
Stars: ✭ 152 (+310.81%)
Mutual labels:  json, template-engine
Treefrog Framework
TreeFrog Framework : High-speed C++ MVC Framework for Web Application
Stars: ✭ 885 (+2291.89%)
Mutual labels:  json, template-engine
Netclient Ios
Versatile HTTP Networking in Swift
Stars: ✭ 117 (+216.22%)
Mutual labels:  json, framework
Autoserver
Create a full-featured REST/GraphQL API from a configuration file
Stars: ✭ 188 (+408.11%)
Mutual labels:  json, framework
Marklogic Data Hub
The MarkLogic Data Hub: documentation ==>
Stars: ✭ 113 (+205.41%)
Mutual labels:  json, framework
Http Rpc
Lightweight REST for Java
Stars: ✭ 298 (+705.41%)
Mutual labels:  json, template-engine
Devis
A microservices framework for Node.js
Stars: ✭ 72 (+94.59%)
Mutual labels:  json, framework
Neo
Create blazing fast multithreaded Web Apps
Stars: ✭ 1,219 (+3194.59%)
Mutual labels:  json, framework
Cppwebframework
​The C++ Web Framework (CWF) is a MVC web framework, Open Source, under MIT License, using C++ with Qt to be used in the development of web applications.
Stars: ✭ 348 (+840.54%)
Mutual labels:  json, framework
Latke
🌀 一款以 JSON 为主的 Java Web 框架。
Stars: ✭ 781 (+2010.81%)
Mutual labels:  json, framework

Jbuilder

Build StatusGitHub release

Generate JSON objects with a Builder-style DSL, inspired by jbuilder (https://github.com/rails/jbuilder)

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      jbuilder:
        github: shootingfly/jbuilder
    
  2. Run shards install

Usage

require "jbuilder"

First, write down the code.

Jbuilder.new do |json|
  json.null nil
  json.code 200
  json.msg "ok"
  json.merge!({"code" => 201})
  json.array! "array1", [1, 1.0, "1"]
  json.array!("array2", [1, 2, 3, 4]) do |json, item|
    json.code item
  end
  json.data do |json|
    json.code 400
    json.array! "array3", [1, 1.0, "1"]
  end
  json.set!("custom_field", %w[1 2])
end.to_json

Then you can see,

{
  "null":null,
  "code":201,
  "msg":"ok",
  "array1":[
    1,
    1.0,
    "1"
  ],
  "array2":[
    {
      "code":1
    },
    {
      "code":2
    },
    {
      "code":3
    },
    {
      "code":4
    }
  ],
  "data":{
    "code":400,
    "array3":[
      1,
      1.0,
      "1"
    ]
  },
  "custom_field":[
    "1",
    "2"
  ]
}

An example using Kemal

https://github.com/shootingfly/kemal-jbuilder-example

Changelog

  • v0.3.0
    • Support Tuple and Named Tuple
    • Support render with layout and child template
  • v0.2.0
    • Support Kilt
  • v0.1.0
    • First Release

Contributing

  1. Fork it (https://github.com/shootingfly/jbuilder/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].