# \#scanf

**URL:** https://discuss.ocaml.org/tag/scanf/746.md

[Latest](https://discuss.ocaml.org/latest.md) · [Categories](https://discuss.ocaml.org/categories.md) · [Tags](https://discuss.ocaml.org/tags.md)

---

## [Which data type to use as an input channel for a parser?](https://discuss.ocaml.org/t/which-data-type-to-use-as-an-input-channel-for-a-parser/17967)

<div class="topic-metadata">

**Author:** [@jbe](https://discuss.ocaml.org/u/jbe)\
**Replies:** 6\
**Last updated:** [April 11, 2026, 3:18pm UTC](https://discuss.ocaml.org/t/which-data-type-to-use-as-an-input-channel-for-a-parser/17967 "2026-04-11T15:18:48Z")

</div>

I have an API for which I would like to add a function that parses a specific data structure from its text representation. I currently want to process the input on a per-line basis, but this is just how I currently do i…
