This is a legit bug (json.h, v1.4.0):
Casablanca folks,
Can you please acknowledge?
Yiannis
template<typename CharType>
void format_impl(std::basic_string<CharType>& str) const
{
str.push_back('[');
for (auto iter = m_elements.begin(); iter != m_elements.end(); ++iter)
{
iter->second.format(str);
str.push_back(',');
}
str[str.size() - 1] = ']';
}
The code tries to replace the last ',' character with the closing square bracket (']') but ends up replacing the opening bracket if there are no elements in the array.Casablanca folks,
Can you please acknowledge?
Yiannis