Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undeclared identifier: 'parse' in the example of parseHook #23

Closed
geohuz opened this issue Jul 26, 2021 · 2 comments
Closed

undeclared identifier: 'parse' in the example of parseHook #23

geohuz opened this issue Jul 26, 2021 · 2 comments

Comments

@geohuz
Copy link

geohuz commented Jul 26, 2021

learnning jsony and found error of the following code:

proc parseHook*(s: string, i: var int, v: var DateTime) =
  var str: string
  parseHook(s, i, str)
  v = parse(str, "yyyy-MM-dd hh:mm:ss")

var dt = """ "2020-01-01 00:00:00" """.fromJson(DateTime)

and I couldn't find the parse proc in the api.

@geohuz
Copy link
Author

geohuz commented Jul 26, 2021

I found the parse proc in the times module.

@geohuz geohuz closed this as completed Jul 26, 2021
@treeform
Copy link
Owner

I have added a line to the docs to import times. I hope that helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants