| 854 | } |
| 855 | |
| 856 | template <typename Iter> inline std::string _parse_number(input<Iter> &in) { |
| 857 | std::string num_str; |
| 858 | while (1) { |
| 859 | int ch = in.getc(); |
| 860 | if (('0' <= ch && ch <= '9') || ch == '+' || ch == '-' || ch == 'e' || ch == 'E') { |
| 861 | num_str.push_back(static_cast<char>(ch)); |
| 862 | } else if (ch == '.') { |
| 863 | #if PICOJSON_USE_LOCALE |
| 864 | num_str += localeconv()->decimal_point; |
| 865 | #else |
| 866 | num_str.push_back('.'); |
| 867 | #endif |
| 868 | } else { |
| 869 | in.ungetc(); |
| 870 | break; |
| 871 | } |
| 872 | } |
| 873 | return num_str; |
| 874 | } |
| 875 | |
| 876 | template <typename Context, typename Iter> inline bool _parse(Context &ctx, input<Iter> &in) { |
| 877 | in.skip_ws(); |