You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by "SolidWallOfCode (via GitHub)" <gi...@apache.org> on 2023/04/25 15:38:42 UTC

[GitHub] [trafficserver] SolidWallOfCode commented on pull request #9599: TS API - records.yaml Add API to parse YAML nodes that are expected to be read as legacy records.

SolidWallOfCode commented on PR #9599:
URL: https://github.com/apache/trafficserver/pull/9599#issuecomment-1522016249

   I've been pondering this and I don't think this is going to suffice. For instance, suppose `field1` is an array - does the plugin have to parse that independently? 
   
   A similar alternative we may want to look at is SAX style parsing. This has proved very successful in practice for both XML and JSON. It is event driven (which makes it similar to this) but has more events to handle nested data. Here is [one example](https://zserge.com/jsmn/) written in C.  Since YAML is data equivalent to JSON we could ~steal~ pay homage to the API in a rather direct way.
   
   The bigger question is, how would this be used in practice, say by `conf_remap`? Once the value is parsed, how would it be used? If the configuration is structured then that structure would need to be passed to the core. How would that be done? If by (effectively) YAML text, there's no use in the plugin understanding that YAML, it's just blindly forwarding. Is the expectation that the callback points are roots of those values?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org