Giter Club home page Giter Club logo

jsontobuilder's Introduction

Running code:
- Via Main.java class.
- Via BuilderTasksTest.java unit test class.

Implementation:
- Module.java - holds the build() method as requested.
- SharedData.java - holds the building map. While "visited" is a Loop stop condition. And "built" is a stop condition for not building same Module twice. Example: "A": ["B"], "B": [] - we wont bould B twice.

Comments:

1 - I assume that the input is a json file of format - String: List<String>
2 - If any other format will be presented to me, I will be able to convert it to a format that I support.
3 - Loops are not defined good enough for me.
	- Basically i support them but I dont think they act good.
	  For example: A->B->C->D->B my code will print B A C D and I think this is correct because D cant be build before B and A cares only on B.
	- I think a better approach is to throw some exception when a loop is located in the Json data.
4 - I dont support duplicates in the Json. Example { "a":["b"], "a":["b"]}
5 - I dont support multiple keys with same value. Example { "a": ["b"], "a": ["c"]}
6 - Unit test built on list of possible options, and may fail if an option is not located in them. This DON'T mean the code is incorrect, just that I din't cover a permutation.

jsontobuilder's People

Contributors

dronworks avatar

Watchers

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