Download gemma.cpp/build/_deps/json-src/docs/examples/begin.cpp from ZeroWw/gemma-2-9b-SBS: direct link, hf CLI and curl.
- Browser
- Download file 330 Bytes
-
https://huggingface.co/ZeroWw/gemma-2-9b-SBS/resolve/main/gemma.cpp/build/_deps/json-src/docs/examples/begin.cpp
- Command line
-
hf download hf://ZeroWw/gemma-2-9b-SBS/gemma.cpp/build/_deps/json-src/docs/examples/begin.cpp
-
curl -L -o begin.cpp https://huggingface.co/ZeroWw/gemma-2-9b-SBS/resolve/main/gemma.cpp/build/_deps/json-src/docs/examples/begin.cpp
330 Bytes
| using json = nlohmann::json; | |
| int main() | |
| { | |
| // create an array value | |
| json array = {1, 2, 3, 4, 5}; | |
| // get an iterator to the first element | |
| json::iterator it = array.begin(); | |
| // serialize the element that the iterator points to | |
| std::cout << *it << '\n'; | |
| } | |