TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Meenakshi Agarwal
1.6k
130
22k
How to keep C code in a JSON file and parse from Angular?
Oct 13 2018 5:45 AM
I would like to keep a multi-line C code inside a JSON file something like shown in the below coding snippet.
[
{
language:
"C"
,
value: "
int
c = 0;
for
(
int
i=0; i < 10; ++i) {
}
printf(
"Hello Angular"
);
"
},
{
language:
"C++"
,
value: "
int
main() {
char
* str=
new
char
[10];}"
}
]
However, the Angular fails to load and parse the above JSON file. It seems like conflicting due to the curly braces and the new line characters. Any help in resolving this issue is much appreciated.
Reply
Answers (
3
)
Angularjs popup
Angular2,4,6, Firebase Social Login