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
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.