开发者

Proper Use of JSON [closed]

开发者_JAVA技巧 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

Is it proper to parse through multiple HTML files in Python (Beautiful Soup), and then store the information in JSON format which will be iterated in Objective-C? If not, how should I format it? (I.e. XML, SQL, etc.?)

Thanks!

Edit: The situation I am dealing is the same as my previous question (although a different aspect is being discussed). https://stackoverflow.com/questions/6836836/good-organization-for-a-book-app-with-scraped-data


As others have said, your question is vague, but what you're proposing is a perfectly reasonable way of solving your problem as I understand it. I think what you're actually asking is what the best way of storing and loading your data is.

There's nothing wrong with using JSON per se, but it may not be particularly well-suited to what you wish to accomplish. It sounds like you're dealing with documents, and XML is generally preferred for documents. JSON is designed to be a "lightweight data-interchange format," whereas XML is designed specifically specifically for encoding documents. XML will make your life much easier if you need to store and parse formatting information, for instance.

There are a number of XML parsers available for iOS, and I assume there are plenty of options for JSON parsing as well.

To be honest, I'm a little confused as to why you can't simply display the original HTML documents. If you update your question with more information about the specifics of what you're trying to do, I may be able to provide better information.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜