Discuss Scratch

eliwadi
New to Scratch
14 posts

HELP, JSON FILES.

Hi,

I downloaded the Scratch 2.0 Offline and i'm making my own project with it. The github version doesn't have any sprite in the library (it's just for Scratch). I have my own sprites and I don't know how to add them to each category on my Sprites library. I saw that it's with JSON files but I'm not sure how to do it. Someone can help me?


Thank you so much, it'll help me so much to go on
yujason
Scratcher
2 posts

HELP, JSON FILES.

you can used the visual studio 2015 to open the JSON flie
dawidkrainski
Scratcher
100+ posts

HELP, JSON FILES.

JSON file is a text file
e.g.
{
a:{
c:5
},
b:'text',
array:['one',2,[3]]
}

Last edited by dawidkrainski (Aug. 18, 2016 23:37:15)

liam48D
Scratcher
1000+ posts

HELP, JSON FILES.

dawidkrainski wrote:

JSON file is a text file
e.g.
{
a:{
c:5
},
b:'text',
array:['one',2,[3]]
}
That's invalid

First, you need to use double quotes; single quotes don't work. Second, you need to use quotes around the property names.

Fixed:

{
  "a": {
    "c": 5
  },
  "b": "text",
  "array": ["one", 2, [3]]
}

EDIT: Fixed the JSON lol. Thanks jokebookservice1!

Last edited by liam48D (Sept. 25, 2016 12:33:53)


And another note. I'm NOTTTTTT going to name anyone when I say this, but I am not a fan of the idea that you HAVE to make your content so kid friendly it comes off as catering to babies. I feel that young children inherently like the idea of growing up, and understanding more complex ways of thinking that are introduced to them in a simple manner. I know this because I remember being a very young kid, having little control, and wanting to just grow up. I might be getting too philosophical with this, but the point is I don't feel the need to take the easy road, and make loud obnoxious content where I'm yelling a lot and not really being insightful at all. And it became pretty clear that whenever I did anything like that (since I get obnoxious and loud in group recordings naturally) that people didn't enjoy it. But people enjoy this, and I enjoy this. I now make content I'm proud of. I look back to each and every new video, and think “wow, that's really good, I'm proud of that piece of work”. And the fact that I can do that every day now is a new feeling for me. - AntVenom
dawidkrainski
Scratcher
100+ posts

HELP, JSON FILES.

@liam48D, right
kyleplo
Scratcher
100 posts

HELP, JSON FILES.

liam48D wrote:

dawidkrainski wrote:

JSON file is a text file
e.g.
{
a:{
c:5
},
b:'text',
array:['one',2,[3]]
}
That's invalid

First, you need to use double quotes; single quotes don't work. Second, you need to use quotes around the property names.

Fixed:

{
  "a": {
    "c": 5
  },
  "b": "text",
  "array": ["one", 2, [3]]
}

EDIT: Fixed the JSON lol. Thanks jokebookservice1!
The quote type and quotes around property names don't matter in JSON
kyleplo
Scratcher
100 posts

HELP, JSON FILES.

kyleplo wrote:

liam48D wrote:

dawidkrainski wrote:

JSON file is a text file
e.g.
{
a:{
c:5
},
b:'text',
array:['one',2,[3]]
}
That's invalid

First, you need to use double quotes; single quotes don't work. Second, you need to use quotes around the property names.

Fixed:

{
  "a": {
    "c": 5
  },
  "b": "text",
  "array": ["one", 2, [3]]
}

EDIT: Fixed the JSON lol. Thanks jokebookservice1!
The quote type and quotes around property names don't matter in JSON
Sorry, you're right, you do need quotes.
xXNanoDevXx
Scratcher
5 posts

HELP, JSON FILES.

.

Last edited by xXNanoDevXx (Aug. 18, 2017 20:19:28)

scorebat
New to Scratch
31 posts

HELP, JSON FILES.

Yes you need quotes in json. You don't need them in javascript objects. They look similar but are different

Scorebat
blueparrot18
Scratcher
100 posts

HELP, JSON FILES.

scorebat wrote:

Yes you need quotes in json. You don't need them in javascript objects. They look similar but are different
Yes
As stated on the sticky Welcome to the Advanced Topics!:

Welcome to the Advanced Topics!
Feel like saying hello? Introduce yourself in a reply below!

The A(dvanced) T(opic)s are, in a way, the place where you go once you outgrow plain old Scratching. At the ATs, we take Scratch to its limits. Most threads here consist of someone either asking a question or showing off some piece of awesomeness, and then dozens of really smart people tripping over each other to help out with comments (and general oohs and aahs). It's pretty satisfying.

We mainly discuss extensions to Scratch, mainly programs written in other languages that enhance Scratch (think custom forum skins and bots to post to the forums automatically). A lot of it is just coming up with a crazy idea and making it happen. That's a great way to learn; just do it.

There are a few fiendishly hard and therefore undeniably delicious math questions. If you need help with concepts like trigonometry or vectors, feel free to ask on the forums. And sometimes people ask about computer science algorithms (and use big, scary words like lambda which make you look really smart). But one of the biggest topics is the idea of remixing Scratch to make something better—these are called Scratch Modifications (Mods in short).

There have been many, many mods on Scratch, the main ones being BYOB (which introduced lambda), Panther (which can create and read files on your computer and connect to the internet), and Bingo (which can share automatically to a different website, Mod Share). They add customized blocks (at one point a user created a library with over a hundred of these), awesome features, and great new ideas to enhance Scratch.

The best way to enjoy the ATs is to learn the basics of a couple of languages. The most useful are Python, JavaScript, and PHP, since most cool projects are in those languages. Learn how to write and run code and you'll be able to enjoy all the brilliant projects people have. I'm going to let you into some secrets: you can play Scratch projects on iPads, use a Lego robot to control Scratch (and vice-versa), and use Scratch to build a website. It's all thanks to ATers who love to come up with these little toys.

Don't be afraid to ask questions! Nobody judges you based on what you ask, and no question is too basic. Everyone was a newbie once. But don't just ask questions, answer them, too! The ATs work because all the active users are really friendly people who will devote half an hour to write a large article to explain something to you. But return the favor to keep things going – share your knowledge. I cannot begin to imagine how to express how monumentally important this is.

The ATs are a lot of fun. If you love to make cool stuff and hack together fun stuff, you've come to the right place. Be polite, be humble, but have fun: jokes are both accepted and appreciated.

FAQs
Some frequently asked questions on the ATs. Comment below if you want to add an FAQ!

What should I post here? What shouldn't I post here?
If you need help about a project, help with advanced math or physics, or help with computer science or programming languages, you can post your question here. If you want to show off a project you've been working on that is related to Scratch (Scratch mods, etc.), you can post here; but if it is completely unrelated to Scratch (maybe you programmed your own blog or a custom screensaver) post it in Things I'm Making and Creating. Ask about general programming on Stack Overflow, another programming site.

What are Python/PHP/JavaScript?
Python, PHP, and JavaScript are programming languages. So are C and Java. Python and PHP are used to program servers while JavaScript is used to program webpages.

How do I get started making a Scratch Modification?
You will have to learn Squeak, another programming language. Then download the Scratch 1.4 source code and hack away!

How do I share code?
You can share code via a GitHub account or Google Drive. Embed small snippets in [code] BBCode tags. You can specify a language: [code language]. Here's an example for JavaScript:
var x = 0;
for (var i = 0; i <= 100; i++) {
    x += i;
}
alert(x);
A list of languages supported can be found here.

You can host websites on Google App Engine/Heroku/Github Pages, but static HTML pages can be hosted on Google Drive directly.

Can I make Scratch 2.0 mods yet?
Yes! Since the 2.0 source has been released (https://github.com/LLK/scratch-flash), you can edit, compile, and run it on your own. See this tutorial for more.

What's a cache and how do I clear it?
A cache is a feature in your browser that saves webpages to a file so you don't have to load all the content over and over. SInce Scratch 2.0 gets lots of updates these days, you might not see these changes and instead see a cached copy of the site. This is why it is important to clear your cache. This site gives step-by-step instructions for many browsers.

My question isn't listed here. What should I do?
Ask it in a reply to this post! I'll get back to you ASAP.


AT News
General news as well as updates about some specific projects. Comment below if you want to add an update about your project!

May 13th, 2014 – The Flash Player is open-sourced.
May 22nd, 2013 – The scratchblocks2 plugin by blob8108 is running live on the Wiki! Congratulations, blob.
May 9th, 2013 – The ATs are released on Scratch 2.0!

Questions About Scratch or beyond scratch?
Comment on my profile!
blueparrot18
Scratcher
100 posts

HELP, JSON FILES.

blueparrot18 wrote:

scorebat wrote:

Yes you need quotes in json. You don't need them in javascript objects. They look similar but are different
Yes

blueparrot18 wrote:

scorebat wrote:

Yes you need quotes in json. You don't need them in javascript objects. They look similar but are different
Yes


Questions About Scratch or beyond scratch?
Comment on my profile!

Powered by DjangoBB

Standard | Mobile