Giter Club home page Giter Club logo

maven.jerkson's Introduction

WELCOME TO TARIQ'S PainfullAfternoon (Hurtlocker.JerkSON)

  • Objective: To implement a GroceryReporter capable of parsing JerkSON and formatting to a string
  • Purpose: To gain familiarity with regex and payload parsing

You will need all of these today!

In this project you will find a file in the resource directory named RawInput.JerkSON. It was supposed to be a grocery list formated in JSON. However, Tariq, your fearless yet petty leader decided to come reformat it in his own Object Notation. JerkSON... you are welcome.

JSON Format

  • In JSON,
    • keys are encapsulated by quotes
    • values are encapsulated by quotes (unless numeric)
    • key and value are seperated by a colon.
    • key and value pairs are seperated by a comma.
{
  "name" : "Milk",
  "price" : 3.25,
  "type" : "food",
  "expiration" : "01/24/2016" 
}

JerkSON Format

  • Just like JSON, JerkSON is a key-value-pair-data-store.
  • In JerkSON,
    • key and value are seperated by any of the following (:, @, ^, *, %)
    • key and value pairs are seperated by a ;.
    • objects are separated by ##
NaMe:egGS;[email protected];typE^foOd;eXPiRAtIOn%1/24/2016##

Some tidbits

All string manipulation should be achieved through regex to detect and match patterns. Its not guranteed that every Key will have a Value, and every Value will have a pair. For instance:

you may see something like this Name:Milk;Price:3.23;type:;expiration:1/24/2016##

Notice how TYPE has a key but no Value.... if you try and parse this into an object your program could crash. You will need to handle your exceptions! I also expect you to report on how many exceptions you saw while parsing the data. GOOD LUCK ZIPCODERS!!!! May the Odds be ever in your favor!!!!

maven.jerkson's People

Contributors

git-leon avatar

Watchers

James Cloos 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.