Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Shane McC
3,005 PointsHow to pass a String parameter as a non-array?
I'm passing a String parameter into a java function I wrote.
When I pass the string parameter the method is accepting my parameter as follows http://mywebsite.com/getCity.php?StateID={"state":"Alabama"}
I want my method to accept my string parameter as follows http://mywebsite.com/getCity.php?StateID=Alabama
How do I get rid of {"state":"Alabama"}?
Shane McC
3,005 PointsHi Guys
Thanks for your replies. It seems as if this was the correct answer
http://stackoverflow.com/questions/26395003/pass-a-string-parameter-as-a-non-array/26396087#26396087
Gunjeet Hattar
14,483 PointsGunjeet Hattar
14,483 PointsHi Shane can you paste here the method declaration or part of the code where it's being set? It will be helpful to know what parameters are being set