I don't see how the compatibility mode would matter - jsonapi.dumps must return something sendable by the underlying socket (always bytes, never unicode), that is its only reason for existing.