Final cookie functions with json function arguments