Home Forums Add-ons Repeater Field Why not a JSON field ? Reply To: Why not a JSON field ?

  • I am not the developer but I know some of what went into this decision. ACF uses built in WP functions for saving data and it also allow you to use built in WP functions to get the data if you choose to do so.

    If the data was stored as JSON then you could not use get_sub_field() this function is a wrapper for built in functions like get_post_meta().

    The decision was made so that built in WP functions can be used and also be able to know what data in belongs in each row.

    ACF does what we can do using built in WP functions, it just makes it easier to build the admin fields.

    ACF is also recursive, saving a sub field in a repeater works exactly the same a saving a field at the top level. If sub fields worked differently than top level fields then there would need to be different code for sub fields removing the ability to nest repeaters indefinitely.

    Those are just some of the reasons