/* Notice that afterwards, you need to construct the context again anyway to parse another JSON object, and the callback is reset then to the main, schema-interpreting one. The construction action is very lightweight.  */
void lejp_change_callback(struct lejp_ctx *ctx, char(*callback)(struct lejp_ctx *ctx, char reason))
/* Notice that afterwards, you need to construct the context again anyway to parse another JSON object, and the callback is reset then to the main, schema-interpreting one. The construction action is very lightweight.  */
void lejp_change_callback(struct lejp_ctx *ctx, char(*callback)(struct lejp_ctx *ctx, char reason))
{
	ctx->callback(ctx, LEJPCB_DESTRUCTED);
	ctx->callback = callback;
	ctx->callback(ctx, LEJPCB_CONSTRUCTED);
	ctx->callback(ctx, LEJPCB_START);
}