def METHOD_NAME(posting: Any) -> Posting:
    """Parse JSON to a Beancount Posting."""
    amount = posting.get("amount", "")
    entries, errors, _ = parse_string(
        f'2000-01-01 * "" ""\n Assets:Account {amount}',
    )
    if errors:
        raise FavaAPIError(f"Invalid amount: {amount}")
    txn = entries[0]
    if not isinstance(txn, Transaction):
        raise TypeError("Expected transaction")
    pos = txn.postings[0]
    return replace(pos, account=posting["account"], meta=None)