Welcome Guest, Not a member yet? Register   Sign In
Entity JSON encode and manually decode
#3

(04-18-2021, 09:15 AM)includebeer Wrote: That's not in json format, that's encoded with serialize(). You need to use unserialize() to decode it back to an array.
Got it! Thanks.
The unserialize() worked perfectly.
But I am having following code in my Entity...
PHP Code:
protected $casts = [
    
'courses'        => 'array',
    
'courses_object' => 'json',
    
'courses_array'  => 'json-array',
]; 
The CodeIgniter is using word 'json' here? Exclamation
Reply


Messages In This Thread
RE: Entity JSON encode and manually decode - by ipmeel - 04-18-2021, 09:25 AM



Theme © iAndrew 2016 - Forum software by © MyBB