{"result":{"depiction_url":null,"edges":{"subject":{"objects":[{"created":"2026-09-30T09:11:23Z","object_id":{"id":2555,"is_a":["categorization","keyword","keyword_information_type"],"name":"zotonic_topic_reference","title":"Reference","uri":"https:\/\/zotonic.com\/id\/2555"},"seq":1},{"created":"2026-09-30T09:11:23Z","object_id":{"id":2563,"is_a":["categorization","keyword","keyword_audience"],"name":"zotonic_topic_frontend_developer","title":"Frontend developer","uri":"https:\/\/zotonic.com\/id\/2563"},"seq":2},{"created":"2026-09-30T09:11:23Z","object_id":{"id":2647,"is_a":["categorization","keyword","keyword_task"],"name":"zotonic_topic_parse","title":"Parse","uri":"https:\/\/zotonic.com\/id\/2647"},"seq":3},{"created":"2026-09-30T09:11:23Z","object_id":{"id":2672,"is_a":["categorization","keyword","keyword_technology"],"name":"zotonic_topic_html","title":"HTML","uri":"https:\/\/zotonic.com\/id\/2672"},"seq":4},{"created":"2026-09-30T09:11:23Z","object_id":{"id":2673,"is_a":["categorization","keyword","keyword_technology"],"name":"zotonic_topic_javascript","title":"JavaScript","uri":"https:\/\/zotonic.com\/id\/2673"},"seq":5},{"created":"2026-09-30T09:11:23Z","object_id":{"id":2718,"is_a":["categorization","keyword","keyword_technology"],"name":"zotonic_topic_cotonic","title":"Cotonic","uri":"https:\/\/zotonic.com\/id\/2718"},"seq":6}],"predicate":{"id":308,"is_a":["meta","predicate"],"name":"subject","title":{"_type":"trans","tr":{"en":"Keyword"}},"uri":"http:\/\/purl.org\/dc\/elements\/1.1\/subject"}}},"id":2731,"is_a":["text","documentation","reference","cotonic_reference"],"links":[{"rel":"self","target":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/2731"},{"rel":"hub","target":"https:\/\/zotonic.com\/.zotonic\/websub"}],"medium":null,"medium_url":null,"name":"doc_cotonic_cotonic_tokenizer","page_url":{"en":"https:\/\/zotonic.com\/cotonic\/cotonic_tokenizer","x-default":"https:\/\/zotonic.com\/cotonic\/cotonic_tokenizer"},"preview_url":null,"resource":{"version":16,"pivot_location_lat":null,"title":"cotonic.tokenizer","is_authoritative":true,"body":"<a name=\"cotonic.tokenizer\"><\/a>\n\n            <p>\n            The tokenizer transforms text to html tokens. The tokenizer is used by the\n            user interface composer in order to call the incremental-dom api.\n            It uses incremental-dom to do in-place diffing of the dom-tree.\n            <br \/>\n            <em>Note: The tokenizer does not parse or validate the html. It just\n                tokenizes the input.<\/em>\n\n            <\/p>\n\n            <!-- tokens -->\n            <a name=\"cotonic.tokenizer.tokens\"><\/a><h2>tokens <code>cotonic.tokenizer.tokens(text)<\/code><\/h2><p>\n            Transforms a string with html tags into a list of tokens. The tokens are\n            objects of the form: <tt>{type: &quot;type&quot;, [args]}<\/tt>, with type being one of:\n            <\/p>\n            <dl>\n                <dt><tt>open<\/tt><\/dt>\n                <dd>Represents an open tag. Contains the attribute <tt>tag<\/tt> which is\n                set to the tagname of the element, and the attribute <tt>attributes<\/tt>\n                which is a list of attributes of the element.\n                <\/dd>\n\n                <dt><tt>close<\/tt><\/dt>\n                <dd>Represents a close tag. Contains the attribute <tt>tag<\/tt> which is\n                set to the tagname of the close element.<\/dd>\n\n                <dt><tt>void<\/tt><\/dt>\n                <dd>Represents a void element. The attribute <tt>tag<\/tt> is set to the\n                tagname of the void element.<\/dd>\n\n                <dt><tt>text<\/tt><\/dt>\n                <dd>Represents a test element. The attribute <tt>data<\/tt> is set to the\n                text data.<\/dd>\n\n                <dt><tt>doctype<\/tt><\/dt>\n                <dd>Represents a doctype element. The attribute <tt>attributes<\/tt> is\n                set to the attributes of the element.<\/dd>\n\n                <dt><tt>pi<\/tt><\/dt>\n                <dd>Represents a processing instruction element. The attribute <tt>tag<\/tt>\n                is set to the tagname of the processing instruction. The attribute\n                <tt>arguments<\/tt> contains the list of attributes.<\/dd>\n\n                <dt><tt>comment<\/tt><\/dt>\n                <dd>Represents a comment element. The attribute <tt>data<\/tt> contains\n                the text in the comment element.<\/dd>\n            <\/dl>\n            <pre>\ncotonic.tokenizer.tokens(&quot;&lt;div class=&#39;example&#39;&gt;Tokenizing&lt;br \/&gt; is cool&lt;\/div&gt;&quot;);\n=&gt; [{type: &quot;open&quot;, tag: &quot;div&quot;, attributes: [&quot;class&quot;, &quot;example&quot;]},\n    {type: &quot;text&quot;, data: &quot;Tokenizing&quot;},\n    {type: &quot;void&quot;, tag: &quot;br&quot;, attributes: []},\n    {type: &quot;text&quot;, data: &quot; is cool&quot;},\n    {type: &quot;close&quot;, tag: &quot;div&quot;}] <\/pre>\n\n            <!-- charref -->\n            <a name=\"cotonic.tokenizer.charref\"><\/a><h2>charref <code>cotonic.tokenizer.charref(text)<\/code><\/h2><p>\n            Transforms a html charref into a character.\n            <\/p>\n            <pre>\ncotonic.tokenizer.charref(&quot;#128540&quot;);\n=&gt; &quot;😜&quot;\ncotonic.tokenizer.charref(&quot;amp&quot;);\n=&gt; &quot;&amp;&quot;<\/pre>\n\n\n            ","slug":"cotonic.tokenizer","is_protected":false,"visible_for":0,"tz":"UTC","language":["en"],"doc_source_hash":"6ec6a5acd20c88eeb7f31442109378c4bef651f6d0c698a1d37f5fe26cd5843b","is_featured":false,"content_group_id":{"id":2551,"is_a":["meta","content_group"],"name":"content_group_imported_docs","title":"Imported documentation","uri":"https:\/\/zotonic.com\/id\/content_group_imported_docs"},"category_id":{"id":2722,"is_a":["meta","category"],"name":"cotonic_reference","title":"Cotonic","uri":"https:\/\/zotonic.com\/id\/cotonic_reference"},"doc_source_path":"index.html","publication_start":"2026-09-30T09:11:23Z","page_path":"\/cotonic\/cotonic_tokenizer","github_url":"https:\/\/github.com\/cotonic\/cotonic\/blob\/master\/index.html","pivot_location_lng":null,"doc_source_kind":"cotonic","name":"doc_cotonic_cotonic_tokenizer","is_unfindable":false,"is_published":true,"pivot_geocode":null,"created":"2026-09-30T09:11:23Z","uri":null,"doc_source_anchor":"cotonic.tokenizer","doc_status":"current","is_dependent":false,"publication_end":"9999-06-01T00:00:00Z","modifier_id":{"id":1,"is_a":["person"],"name":"administrator","title":"Site Administrator","uri":"https:\/\/zotonic.com\/id\/1"},"privacy":0,"doc_source_commit":"f88cc928b997d10f7f19e6bd0ede80e1c8c619bc","creator_id":{"id":1,"is_a":["person"],"name":"administrator","title":"Site Administrator","uri":"https:\/\/zotonic.com\/id\/1"},"modified":"2026-09-30T10:06:59Z","title_slug":"cotonic.tokenizer"},"uri":"https:\/\/zotonic.com\/id\/2731","uri_template":"https:\/\/zotonic.com\/id\/:id","websub":{"hub":"https:\/\/zotonic.com\/.zotonic\/websub","topic":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/2731"}},"status":"ok"}