A JSON cleaner written with Ruby and Sinatra.

Corey Prophitt e7863b7187 Updated the readme 3 weeks ago
app b2352c8d52 Rubocop'd json_beautifier.rb 5 years ago
snapshots e7863b7187 Updated the readme 3 weeks ago
.gitignore 405535b956 Added editor (vim) files to .gitignore. 6 years ago
.travis.yml ff6cd278e3 Updated travis config. 5 years ago
Gemfile 77b86c55bd Added rubocop and travis config 5 years ago
Gemfile.lock 91609013e5 Updated gems 5 years ago
LICENSE 218d021b32 Added license file. 6 years ago
app.rb 8bf7e2bcc8 Rubo-cop'd app.rb 5 years ago
config.ru 952186c1a4 Cleaned up some double quotes. 5 years ago
readme.md e7863b7187 Updated the readme 3 weeks ago

readme.md

JSON Cleaner

Build Status

JSON Cleaner is a simple modular Sinatra application. The purpose of it was to demonstrate how to organize and configure a Sinatra application using multiple folders and single dependency management system that doesn't rely on explicitly requiring them yourself. These techniques are simple and can assist you in the creation of a rather large Sinatra application.

The application itself is a clone of JSON Pretty Print. You can see it here:

http://jsonprettyprint.com/

Below you can see JSON Cleaner's rendition of JSON Pretty Print.

alt text alt text alt text


Installation

I assume you have an installation of Ruby and are able to install gems. If not you need to seek out how, I recommend RVM to manage Ruby installations.

Grab the code to begin with:

$ git clone https://code.prophitt.me/corey/json-cleaner.git
$ cd ./json-cleaner

First and foremost you need to have the Bundler gem installed

$ gem install bundler

Then all you need to do is run bundle:

$ bundle

Now run the application:

$ rackup

You're done. You can also specify the environment to run, the default is development, but you can run it in production with:

$ RACK_ENV=production rackup

Usage

  1. Open web browser
  2. Go to http://localhost:9292 (or where every you tell rackup to run).
  3. Paste some JSON and click 'Clean JSON'

License

The MIT License (MIT)

Copyright (c) 2014, Corey Prophitt

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.