mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-01 16:14:05 +01:00
42 lines
807 B
C++
42 lines
807 B
C++
// Copyright Benoit Blanchon 2014-2016
|
|
// MIT License
|
|
//
|
|
// Arduino JSON library
|
|
// https://github.com/bblanchon/ArduinoJson
|
|
// If you like this project, please add a star!
|
|
|
|
#pragma once
|
|
|
|
namespace ArduinoJson {
|
|
namespace Internals {
|
|
|
|
// Parse JSON string to create JsonArrays and JsonObjects
|
|
// This internal class is not indended to be used directly.
|
|
// Instead, use JsonBuffer.parseArray() or .parseObject()
|
|
template <typename TIterator>
|
|
class StringReader {
|
|
TIterator _input;
|
|
char _current, _next;
|
|
|
|
public:
|
|
StringReader(const TIterator& input) : _input(input) {
|
|
_current = _input.next();
|
|
_next = _input.next();
|
|
}
|
|
|
|
void move() {
|
|
_current = _next;
|
|
_next = _input.next();
|
|
}
|
|
|
|
char current() const {
|
|
return _current;
|
|
}
|
|
|
|
char next() const {
|
|
return _next;
|
|
}
|
|
};
|
|
}
|
|
}
|