NREL / OpenStudio

OpenStudio is a cross-platform collection of software tools to support whole building energy modeling using EnergyPlus and advanced daylight analysis using Radiance.
https://www.openstudio.net/
Other
484 stars 185 forks source link

Fix #5196 - valueAsJSON does not respect type #5197

Closed jmarrec closed 1 month ago

jmarrec commented 1 month ago

Pull request overview

Pull Request Author

Labels:

Review Checklist

This will not be exhaustively relevant to every PR.

shorowit commented 1 month ago

Did a quick test with ruby and it works correctly. Thanks, @jmarrec!

shorowit commented 1 month ago

Can we remove this too? https://github.com/NREL/OpenStudio/blob/develop/src/cli/RunCommand.cpp#L37

jmarrec commented 1 month ago

Integer was broken after that quick fix.

Ok I see I got tripped up by reading a probably EXTREMELY outdated documentation for Json::Value (yeah, it's from 0.5.0...)

https://jsoncpp.sourceforge.net/class_json_1_1_value.html#ec4f74ef7b776b1d9c8a10fc3bb4add5

This commit from cough 13 years ago (json 0.7.0) changed the behavior

https://github.com/open-source-parsers/jsoncpp/commit/1b138e8544d87f8bc4b35214be9f2bdcf78d1f36

ci-commercialbuildings commented 1 month ago

CI Results for c05003a002a12e578ece68d41cac574c3313bcd0: