Click here to Skip to main content
15,885,985 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralChuck Yeager has left the building Pin
Slacker0077-Dec-20 19:35
professionalSlacker0077-Dec-20 19:35 
GeneralRe: Chuck Yeager has left the building Pin
Sandeep Mewara7-Dec-20 21:02
mveSandeep Mewara7-Dec-20 21:02 
GeneralRe: Chuck Yeager has left the building Pin
grralph18-Dec-20 0:26
grralph18-Dec-20 0:26 
GeneralRe: Chuck Yeager has left the building Pin
GuyThiebaut8-Dec-20 1:12
professionalGuyThiebaut8-Dec-20 1:12 
GeneralRe: Chuck Yeager has left the building Pin
glennPattonWork38-Dec-20 7:28
professionalglennPattonWork38-Dec-20 7:28 
GeneralGosh I'm fortunate today Pin
honey the codewitch7-Dec-20 14:16
mvahoney the codewitch7-Dec-20 14:16 
GeneralRe: Gosh I'm fortunate today Pin
Super Lloyd7-Dec-20 17:01
Super Lloyd7-Dec-20 17:01 
JokeRe: Gosh I'm fortunate today PinPopular
Sander Rossel8-Dec-20 1:18
professionalSander Rossel8-Dec-20 1:18 
Alright, first of all, you definitely need a factory for this, and then an abstract factory for your factory.
Second, this just screams for a visitor! Too many switches cases.
Of course the handling of the various nodes is just asking for a strategy pattern, possibly combined with a template method.
As a default, it should implement a null pattern so you don't get NullReferenceExceptions.
Are you even using an interpreter for this code?
I hope you've at least broken it up in multiple packages, at least one for your interfaces and another one for your JSON implementation.

This code is heavily under-engineered and I doubt it could even be extended to handle XML or YAML.
So yeah, just my two cents Poke tongue | ;-P

GeneralRe: Gosh I'm fortunate today Pin
honey the codewitch8-Dec-20 1:20
mvahoney the codewitch8-Dec-20 1:20 
GeneralRe: Gosh I'm fortunate today Pin
Sander Rossel8-Dec-20 1:22
professionalSander Rossel8-Dec-20 1:22 
GeneralRe: Gosh I'm fortunate today Pin
honey the codewitch8-Dec-20 1:23
mvahoney the codewitch8-Dec-20 1:23 
PraiseRe: Gosh I'm fortunate today Pin
Slacker0078-Dec-20 2:14
professionalSlacker0078-Dec-20 2:14 
GeneralRe: Gosh I'm fortunate today Pin
W Balboos, GHB8-Dec-20 4:04
W Balboos, GHB8-Dec-20 4:04 
GeneralRe: Gosh I'm fortunate today Pin
honey the codewitch8-Dec-20 4:07
mvahoney the codewitch8-Dec-20 4:07 
GeneralRe: Gosh I'm fortunate today Pin
W Balboos, GHB8-Dec-20 5:25
W Balboos, GHB8-Dec-20 5:25 
QuestionBREXIT Pin
5teveH7-Dec-20 5:20
5teveH7-Dec-20 5:20 
AnswerRe: BREXIT Pin
CodeWraith7-Dec-20 5:56
CodeWraith7-Dec-20 5:56 
AnswerRe: BREXIT Pin
Nelek7-Dec-20 6:36
protectorNelek7-Dec-20 6:36 
AnswerRe: BREXIT Pin
DerekT-P7-Dec-20 9:46
professionalDerekT-P7-Dec-20 9:46 
AnswerRe: BREXIT Pin
Richard MacCutchan7-Dec-20 10:15
mveRichard MacCutchan7-Dec-20 10:15 
GeneralRe: BREXIT Pin
OriginalGriff7-Dec-20 10:57
mveOriginalGriff7-Dec-20 10:57 
GeneralRe: BREXIT Pin
Greg Utas7-Dec-20 13:19
professionalGreg Utas7-Dec-20 13:19 
GeneralRe: BREXIT Pin
5teveH7-Dec-20 22:01
5teveH7-Dec-20 22:01 
GeneralRe: BREXIT Pin
Richard MacCutchan7-Dec-20 22:29
mveRichard MacCutchan7-Dec-20 22:29 
GeneralRe: BREXIT Pin
Greg Utas8-Dec-20 1:40
professionalGreg Utas8-Dec-20 1:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.