Code Monkey home page Code Monkey logo

rubyjsoncamelizer's Introduction

Streamline your JSON and your JavaScript by converting all JSON keys into practical JavaScript-style camelCase keys.

Convert this:

[
	{
		"Some Key (Seriously)"	:	"Some Value"
	}
]

into this:

[{"someKey":"Some Value"}]

Usage

Installation

Dependencies

~ $ gem install json

Source

~ $ git clone https://www.github.com/joshbeam/RubyJSONCamelizer.git

Conversion

~/RubyJSONCamelizer/dist $ ruby main.rb #<original file> #<new file>

# => if new file exists already, it will confirm if you want to overwrite it

Example

~/RubyJSONCamelizer/dist $ ruby main.rb ../../SomeProjectFolder/someData.json ../../SomeProjectFolder/newCamelizedData.json

Used primarily in this Periodic Table application to convert data into a streamlined format.

Features

  • Removes anything that's in parentheses from the keys
  • Creates camelCase keys

Copyright © 2015 Joshua Beam (MIT License)

rubyjsoncamelizer's People

Contributors

joshbeam avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.