docdef/source/outputs/implementations/json.ts

52 lines
648 B
TypeScript
Raw Normal View History

2024-02-08 10:41:17 +01:00
/**
*/
class type_output_json implements type_output<string>
{
public readonly kind : string = "json";
public readonly data : {};
public constructor(data : {}) {this.data = data;}
/**
*/
2024-02-08 18:10:46 +01:00
public render_object(
object : type_object
2024-02-08 10:41:17 +01:00
) : string
{
return lib_plankton.call.distinguish<string>(
2024-02-08 18:10:46 +01:00
object,
2024-02-08 10:41:17 +01:00
{
},
{
2024-02-08 18:10:46 +01:00
"fallback": (object) => JSON.stringify(object, undefined, "\t"),
2024-02-08 10:41:17 +01:00
}
);
}
2024-02-08 18:10:46 +01:00
/**
* @todo
* @implementation
*/
public render_document(
document : type_document
) : string
{
return ""
}
2024-02-08 10:41:17 +01:00
}
2024-02-08 11:10:07 +01:00
/**
*/
output_kind_register(
"json",
(data, sub) => (
new type_output_json(
{
}
)
)
);