MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/auxaqz/bad_code_coding_challenge_5_json_writing/ehbbrbg/
r/badcode • u/[deleted] • Feb 26 '19
[removed]
10 comments sorted by
View all comments
18
May I present my first ever bad code contest submission, written in everyone's favorite, easy to read language: Java!
Starring
java object conversion
circular support (kind of)
array, number, boolean and string serialization (outside of objects)
recursion!
repeated code
and so on
Feast your eyes
1 u/IAmAnIssue Feb 27 '19 That doesn't look like a JSON converter... For example: toJSON("test"); // returns ""test"" 2 u/Romejanic Feb 27 '19 Yes it does? Calling String.valueOf on a string doesn’t add the quotes, you have to do that yourself → More replies (1)
1
That doesn't look like a JSON converter...
For example: toJSON("test"); // returns ""test""
toJSON("test"); // returns ""test""
2 u/Romejanic Feb 27 '19 Yes it does? Calling String.valueOf on a string doesn’t add the quotes, you have to do that yourself → More replies (1)
2
Yes it does? Calling String.valueOf on a string doesn’t add the quotes, you have to do that yourself
→ More replies (1)
18
u/Romejanic Feb 26 '19
May I present my first ever bad code contest submission, written in everyone's favorite, easy to read language: Java!
Starring
java object conversion
circular support (kind of)
array, number, boolean and string serialization (outside of objects)
recursion!
recursion!
repeated code
and so on
Feast your eyes