Giter Club home page Giter Club logo

json-html-parser's Introduction

series-4

json parser

implement classes in sbu.cs.parser.json package.

  • extract good methods
  • declare classes where is needed
  • all json that you need to parse have only 5 possible value types
    1. String
    2. number
    3. boolean (true or false)
    4. null
    5. array
  • all json that you need to parse have these rules
    1. keys are in double quote (" ")
    2. between key and value there is :
    3. between each key/value pair there is a comma (,)
    4. a json object will always start with { and end with }

more score

  • implement function getValue which return the value of a key which is not necessarily a String. it can be int, null, boolean or another Json object. for this you probably need to declare classes for values.

  • write a json parser which can parse json that have a key mapped to another json.

dom

implement classes in sbu.cs.parser.html package.

  • extract good methods
  • declare classes where is needed
  • in all html Strings given to parse these rules are considered.
    1. all tags that start will end eventually. there is no tag that opens and never close.
    2. tags may have attributes and all attributes are in key/value pairs

more score

  • implement function toHTMLString that gets a Dom object (Node root) and return a String that is the html representation of dom object (opposite of parse)

String trim function

String str = "  salam ";
System.out.println(str.trim());     // will print 'salam'

read about this function. you may need what it does in this series.

json-html-parser's People

Contributors

ali-aliabadi avatar mohammadkarbalaee avatar scheshmi avatar

Stargazers

 avatar  avatar  avatar  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.