src/swagger2x.py
def convert_to_c_type(json_type):
    """
    convert the json type to c type
    :param json_type: the json type
    :return: c type.
    """
    if json_type in ["boolean"]:
        return "bool"
    if json_type in ["number"]:
        return "double"
    if json_type in ["integer"]:
        return "int"  # uint8_t ?
    if json_type in ["string"]:
        return "char*"

    # array versions e.g. postpended with []
    if json_type in ["string[]"]:
        return "char**"
    if json_type in ["integer[]"]:
        return "int*"
    if json_type in ["boolean[]"]:
        return "bool*"
    if json_type in ["number[]"]:
        return "double*"

    return "void*"

    convert the json type to c type
    :param json_type: the json type
    :return: c type.
    
convert the json type to c type
convert the json type to c type
def convert_to_c_type(json_type):
    if json_type in ["boolean"]:
        return "bool"
    if json_type in ["number"]:
        return "double"
    if json_type in ["integer"]:
        return "int"  
    if json_type in ["string"]:
        return "char*"
    if json_type in ["string[]"]:
        return "char**"
    if json_type in ["integer[]"]:
        return "int*"
    if json_type in ["boolean[]"]:
        return "bool*"
    if json_type in ["number[]"]:
        return "double*"
    return "void*"
def convert_to_c_type ( json_type ) : if json_type in [ "boolean" ] : return "bool" if json_type in [ "number" ] : return "double" if json_type in [ "integer" ] : return "int" if json_type in [ "string" ] : return "char*" if json_type in [ "string[]" ] : return "char**" if json_type in [ "integer[]" ] : return "int*" if json_type in [ "boolean[]" ] : return "bool*" if json_type in [ "number[]" ] : return "double*" return "void*"
convert the json type to c type
convert the json type to c type
"""
    convert the json type to c type
    :param json_type: the json type
    :return: c type.
    """ # uint8_t ?
 # array versions e.g. postpended with []

None
json_type
the json type
the json type