human
string to json date.
assistant
Here is a Python function for string to json date

import json

def json_date(date):
    """
    >>> json_date('2019-01-01')
    {'year': 2019,'month': 1, 'day': 1}
    """
    return {'year': date[:4],'month': date[4:6], 'day': date[6:]}

# Enter the date
date ="yellow submarine"

# Calling the function
print((json_date(date)))

# Printing the date

#Example Output
# {'year': 'yell', 'month': 'ow', 'day': ' submarine'}

#Remember to inspect code for bugs.