pyhocon
pyhocon copied to clipboard
to_hocon is so strange
Hello contributors and maintainers of this project. I was a little surprised by this implementation of the "to_hocon" function in "pyhocon/pyhocon/converter.py". I assumed that this function should determine the format of the data transmitted to the input and transfer it to HOCON. Could you explain the meaning of this function? And do you plan to do the translation function to HOCON from other formats like yaml, jsonm properties?
def to_hocon(cls, config, compact=False, indent=2, level=0):
"""Convert HOCON input into a HOCON output
Hi @therb1. This function is part of a class that converts hocon configs to a pretty formatted string. The class HOCONConverter
should probably be renamed.
I like your idea to create a generic converter to and from json, yaml, properties and have a separate class that could format HOCON configs.