• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

ZipCodeCore/JerkSON.Maven

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

ZipCodeCore/JerkSON.Maven

开源软件地址(OpenSource Url):

https://github.com/ZipCodeCore/JerkSON.Maven

开源编程语言(OpenSource Language):

Java 100.0%

开源软件介绍(OpenSource 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 guaranteed 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. Write a few tests, for each "sub stage" of your code.

And then finally, for each grocery item, built a quick text output of High/Low and and Average value for the things on the list. GOOD LUCK ZIPCODERS!!!! May the Odds be ever in your favor!!!!




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
cstamas/maven-indexer-examples: Maven Indexer Examples发布时间:2022-08-17
下一篇:
ImpactDevelopment/maven: Maven repo发布时间:2022-08-17
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap