CS2212-2012-G2 / SurvivorPool

CS2212 Project
Other
1 stars 0 forks source link

Bonus json #52

Closed slyos closed 12 years ago

slyos commented 12 years ago

In BonusQuestion.fromJsonObject(), where we set the week.

o.get returns a STRING when running the main within the class, but returns a LONG when you read in from the file generated by bb.

Anyone know why?

Nava2 commented 12 years ago

What's the value of the string?

JSON.simple returns "Number" instances rather than integers.

slyos commented 12 years ago

The values are correct for both. It just depends on where we read it from. Running from main results in a different object than reading from file for some reason.

Nava2 commented 12 years ago

Can you give some examples? :/

slyos commented 12 years ago

I'll update the BonusQuestions main function to show the problem.

Nava2 commented 12 years ago

Awesome, I apologize I'm just not following haha On Mar 22, 2012 10:22 AM, "Ramesh Raj" < reply@reply.github.com> wrote:

I'll update the BonusQuestions main function and to show the problem.


Reply to this email directly or view it on GitHub:

https://github.com/CS2212-2012-G2/SurvivorPool/issues/52#issuecomment-4639052

slyos commented 12 years ago

Found out that the setWeek argument was changed from an int to a string on the admin side. I'll change the output on the BB side so it writes as a string rather than an int.

Nava2 commented 12 years ago

Why is the week being set as a string.. :s Its an integer value.