Open mahmoud opened 8 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
2e0c552
) 98.05% compared to head (eed98dd
) 98.05%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I was using glom in a script this week, specifically to extract single values from API calls. I noticed I kept having to trim the quotes and whitespace off of the JSON output, because even when it's a single value, it's quoted and followed by a newline.
So this feature strips the quotes and whitespace when passed a new flag:
--scalar
. This is only done when the glom result is not a collection. If it is, it falls back to normal json output.Some items to consider:
is_scalar
function that maps exactly to this, so even if it's jargon-y, I think it's accurate.--output "json"|"scalar"
?None of these are blockers, I am good to merge as is.